From 649ac532a5f2a8bcf56ac1f0aa6e48374b32886f Mon Sep 17 00:00:00 2001 From: rohantagaru <126915631+rohantagaru@users.noreply.github.com> Date: Tue, 26 Sep 2023 20:25:40 -0700 Subject: [PATCH] Azure Deployment Manager is being decommissioned. Remove its NET SDK through this PR (#38614) --- .../samples/autorest.tests.md | 13 - .../samples/autorest.tests.md | 13 - ...zure.ResourceManager.DeploymentManager.sln | 65 - .../CHANGELOG.md | 57 - .../Directory.Build.props | 6 - .../README.md | 82 - ...anager.DeploymentManager.netstandard2.0.cs | 529 -- .../assets.json | 6 - ...ceManager.DeploymentManager.Samples.csproj | 10 - .../Sample_ArtifactSourceCollection.cs | 257 - .../Samples/Sample_ArtifactSourceResource.cs | 166 - .../Samples/Sample_RolloutCollection.cs | 163 - .../Samples/Sample_RolloutResource.cs | 141 - .../Samples/Sample_ServiceResource.cs | 119 - .../Sample_ServiceResourceCollection.cs | 208 - .../Samples/Sample_ServiceTopologyResource.cs | 155 - ...ample_ServiceTopologyResourceCollection.cs | 246 - .../Samples/Sample_ServiceUnitResource.cs | 173 - .../Sample_ServiceUnitResourceCollection.cs | 267 - .../Generated/Samples/Sample_StepResource.cs | 198 - .../Samples/Sample_StepResourceCollection.cs | 289 - ...e.ResourceManager.DeploymentManager.csproj | 8 - .../ArmDeploymentManagerModelFactory.cs | 289 - .../src/Generated/ArtifactSourceCollection.cs | 414 -- .../src/Generated/ArtifactSourceData.cs | 59 - .../src/Generated/ArtifactSourceResource.cs | 587 -- .../Extensions/DeploymentManagerExtensions.cs | 376 -- .../ResourceGroupResourceExtensionClient.cs | 62 - .../DeploymentManagerArmOperation.cs | 70 - .../DeploymentManagerArmOperationOfT.cs | 76 - .../RolloutOperationSource.cs | 40 - .../ServiceUnitResourceOperationSource.cs | 40 - .../ApiKeyAuthentication.Serialization.cs | 65 - .../Generated/Models/ApiKeyAuthentication.cs | 52 - .../ArtifactSourceData.Serialization.cs | 150 - .../Models/Authentication.Serialization.cs | 39 - .../src/Generated/Models/Authentication.cs | 32 - .../Models/DeploymentMode.Serialization.cs | 28 - .../src/Generated/Models/DeploymentMode.cs | 18 - ...HealthCheckStepAttributes.Serialization.cs | 51 - .../Models/HealthCheckStepAttributes.cs | 48 - ...HealthCheckStepProperties.Serialization.cs | 49 - .../Models/HealthCheckStepProperties.cs | 51 - .../Models/Identity.Serialization.cs | 60 - .../src/Generated/Models/Identity.cs | 45 - .../Generated/Models/Message.Serialization.cs | 44 - .../src/Generated/Models/Message.cs | 34 - .../Models/PrePostStep.Serialization.cs | 41 - .../src/Generated/Models/PrePostStep.cs | 29 - .../Models/ResourceOperation.Serialization.cs | 63 - .../src/Generated/Models/ResourceOperation.cs | 48 - .../Models/RestAuthLocation.Serialization.cs | 28 - .../src/Generated/Models/RestAuthLocation.cs | 18 - .../Models/RestAuthType.Serialization.cs | 28 - .../src/Generated/Models/RestAuthType.cs | 18 - .../Models/RestHealthCheck.Serialization.cs | 64 - .../src/Generated/Models/RestHealthCheck.cs | 47 - ...HealthCheckStepAttributes.Serialization.cs | 121 - .../Models/RestHealthCheckStepAttributes.cs | 40 - .../RestMatchQuantifier.Serialization.cs | 28 - .../Generated/Models/RestMatchQuantifier.cs | 18 - .../Models/RestRequest.Serialization.cs | 58 - .../src/Generated/Models/RestRequest.cs | 46 - ...RestRequestAuthentication.Serialization.cs | 40 - .../Models/RestRequestAuthentication.cs | 32 - .../Models/RestRequestMethod.Serialization.cs | 28 - .../src/Generated/Models/RestRequestMethod.cs | 18 - .../Models/RestResponse.Serialization.cs | 74 - .../src/Generated/Models/RestResponse.cs | 36 - .../Models/RestResponseRegex.Serialization.cs | 74 - .../src/Generated/Models/RestResponseRegex.cs | 36 - ...loutCreateOrUpdateContent.Serialization.cs | 165 - .../Models/RolloutCreateOrUpdateContent.cs | 71 - .../Models/RolloutData.Serialization.cs | 227 - ...outIdentityAuthentication.Serialization.cs | 41 - .../Models/RolloutIdentityAuthentication.cs | 26 - .../RolloutOperationInfo.Serialization.cs | 79 - .../Generated/Models/RolloutOperationInfo.cs | 47 - .../Models/RolloutStep.Serialization.cs | 86 - .../src/Generated/Models/RolloutStep.cs | 59 - .../Models/SasAuthentication.Serialization.cs | 72 - .../src/Generated/Models/SasAuthentication.cs | 33 - .../Generated/Models/Service.Serialization.cs | 61 - .../src/Generated/Models/Service.cs | 49 - .../Models/ServiceProperties.Serialization.cs | 38 - .../src/Generated/Models/ServiceProperties.cs | 34 - .../ServiceResourceData.Serialization.cs | 128 - ...rviceTopologyResourceData.Serialization.cs | 123 - .../Models/ServiceUnit.Serialization.cs | 71 - .../src/Generated/Models/ServiceUnit.cs | 45 - .../ServiceUnitArtifacts.Serialization.cs | 86 - .../Generated/Models/ServiceUnitArtifacts.cs | 42 - .../ServiceUnitProperties.Serialization.cs | 49 - .../Generated/Models/ServiceUnitProperties.cs | 46 - .../ServiceUnitResourceData.Serialization.cs | 144 - .../Models/StepGroup.Serialization.cs | 125 - .../src/Generated/Models/StepGroup.cs | 59 - .../Models/StepOperationInfo.Serialization.cs | 81 - .../src/Generated/Models/StepOperationInfo.cs | 51 - .../Models/StepProperties.Serialization.cs | 40 - .../src/Generated/Models/StepProperties.cs | 32 - .../Models/StepResourceData.Serialization.cs | 106 - .../Models/StepType.Serialization.cs | 28 - .../src/Generated/Models/StepType.cs | 18 - .../UnknownAuthentication.Serialization.cs | 41 - .../Generated/Models/UnknownAuthentication.cs | 20 - ...HealthCheckStepAttributes.Serialization.cs | 80 - .../UnknownHealthCheckStepAttributes.cs | 25 - ...RestRequestAuthentication.Serialization.cs | 41 - .../UnknownRestRequestAuthentication.cs | 20 - .../UnknownStepProperties.Serialization.cs | 41 - .../Generated/Models/UnknownStepProperties.cs | 20 - .../WaitStepAttributes.Serialization.cs | 42 - .../Generated/Models/WaitStepAttributes.cs | 25 - .../WaitStepProperties.Serialization.cs | 49 - .../Generated/Models/WaitStepProperties.cs | 48 - .../src/Generated/ProviderConstants.cs | 16 - .../ArtifactSourcesRestOperations.cs | 361 - .../RestOperations/RolloutsRestOperations.cs | 522 -- .../ServiceTopologiesRestOperations.cs | 361 - .../ServiceUnitsRestOperations.cs | 399 -- .../RestOperations/ServicesRestOperations.cs | 385 -- .../RestOperations/StepsRestOperations.cs | 361 - .../src/Generated/RolloutCollection.cs | 421 -- .../src/Generated/RolloutData.cs | 77 - .../src/Generated/RolloutResource.cs | 734 -- .../src/Generated/ServiceResource.cs | 639 -- .../Generated/ServiceResourceCollection.cs | 413 -- .../src/Generated/ServiceResourceData.cs | 55 - .../src/Generated/ServiceTopologyResource.cs | 640 -- .../ServiceTopologyResourceCollection.cs | 414 -- .../Generated/ServiceTopologyResourceData.cs | 42 - .../src/Generated/ServiceUnitResource.cs | 586 -- .../ServiceUnitResourceCollection.cs | 413 -- .../src/Generated/ServiceUnitResourceData.cs | 59 - .../src/Generated/StepResource.cs | 587 -- .../src/Generated/StepResourceCollection.cs | 414 -- .../src/Generated/StepResourceData.cs | 61 - .../src/Properties/AssemblyInfo.cs | 9 - .../src/autorest.md | 93 - ...urceManager.DeploymentManager.Tests.csproj | 5 - .../DeploymentManagerManagementTestBase.cs | 41 - ...loymentManagerManagementTestEnvironment.cs | 11 - .../AzSdk.RP.props | 7 - ...oft.Azure.Management.DeploymentManager.sln | 55 - .../ReleaseNotes.md | 7 - .../Generated/ArtifactSourcesOperations.cs | 886 --- .../ArtifactSourcesOperationsExtensions.cs | 192 - .../Generated/AzureDeploymentManagerClient.cs | 409 -- .../Generated/IArtifactSourcesOperations.cs | 128 - .../IAzureDeploymentManagerClient.cs | 113 - .../src/Generated/IOperations.cs | 46 - .../src/Generated/IRolloutsOperations.cs | 229 - .../Generated/IServiceTopologiesOperations.cs | 128 - .../src/Generated/IServiceUnitsOperations.cs | 192 - .../src/Generated/IServicesOperations.cs | 139 - .../src/Generated/IStepsOperations.cs | 127 - .../Generated/Models/ApiKeyAuthentication.cs | 92 - .../src/Generated/Models/ArtifactSource.cs | 117 - .../Models/ArtifactSourcePropertiesModel.cs | 104 - .../src/Generated/Models/Authentication.cs | 36 - .../Generated/Models/AzureEntityResource.cs | 59 - .../src/Generated/Models/CloudErrorBody.cs | 77 - .../src/Generated/Models/DeploymentMode.cs | 60 - .../Models/HealthCheckStepAttributes.cs | 95 - .../Models/HealthCheckStepProperties.cs | 70 - .../src/Generated/Models/Identity.cs | 79 - .../src/Generated/Models/Message.cs | 60 - .../src/Generated/Models/Operation.cs | 75 - .../src/Generated/Models/OperationDetail.cs | 78 - .../src/Generated/Models/OperationsList.cs | 51 - .../src/Generated/Models/PrePostStep.cs | 65 - .../src/Generated/Models/ProxyResource.cs | 50 - .../src/Generated/Models/Resource.cs | 72 - .../src/Generated/Models/ResourceOperation.cs | 106 - .../src/Generated/Models/RestAuthLocation.cs | 60 - .../src/Generated/Models/RestHealthCheck.cs | 94 - .../Models/RestHealthCheckStepAttributes.cs | 95 - .../Generated/Models/RestMatchQuantifier.cs | 60 - .../src/Generated/Models/RestRequest.cs | 89 - .../Models/RestRequestAuthentication.cs | 36 - .../src/Generated/Models/RestRequestMethod.cs | 60 - .../src/Generated/Models/RestResponse.cs | 69 - .../src/Generated/Models/RestResponseRegex.cs | 65 - .../src/Generated/Models/Rollout.cs | 187 - .../Models/RolloutIdentityAuthentication.cs | 39 - .../Generated/Models/RolloutOperationInfo.cs | 96 - .../Models/RolloutPropertiesModel.cs | 81 - .../src/Generated/Models/RolloutRequest.cs | 145 - .../src/Generated/Models/RolloutStep.cs | 112 - .../Models/RolloutsCreateOrUpdateHeaders.cs | 55 - .../src/Generated/Models/SasAuthentication.cs | 73 - .../src/Generated/Models/Service.cs | 90 - .../src/Generated/Models/ServiceProperties.cs | 83 - .../src/Generated/Models/ServiceResource.cs | 98 - .../Models/ServiceTopologyProperties.cs | 54 - .../Models/ServiceTopologyResource.cs | 79 - .../src/Generated/Models/ServiceUnit.cs | 89 - .../Generated/Models/ServiceUnitArtifacts.cs | 83 - .../Generated/Models/ServiceUnitProperties.cs | 87 - .../Generated/Models/ServiceUnitResource.cs | 102 - .../ServiceUnitsCreateOrUpdateHeaders.cs | 55 - .../src/Generated/Models/StepGroup.cs | 133 - .../src/Generated/Models/StepOperationInfo.cs | 95 - .../src/Generated/Models/StepProperties.cs | 35 - .../src/Generated/Models/StepResource.cs | 79 - .../src/Generated/Models/TrackedResource.cs | 83 - .../Generated/Models/WaitStepAttributes.cs | 67 - .../Generated/Models/WaitStepProperties.cs | 70 - .../src/Generated/Operations.cs | 227 - .../src/Generated/OperationsExtensions.cs | 53 - .../src/Generated/RolloutsOperations.cs | 1378 ---- .../Generated/RolloutsOperationsExtensions.cs | 362 - .../Generated/ServiceTopologiesOperations.cs | 890 --- .../ServiceTopologiesOperationsExtensions.cs | 192 - .../src/Generated/ServiceUnitsOperations.cs | 1012 --- .../ServiceUnitsOperationsExtensions.cs | 310 - .../src/Generated/ServicesOperations.cs | 925 --- .../Generated/ServicesOperationsExtensions.cs | 214 - .../src/Generated/StepsOperations.cs | 885 --- .../Generated/StepsOperationsExtensions.cs | 190 - ....Azure.Management.DeploymentManager.csproj | 26 - .../src/Properties/AssemblyInfo.cs | 20 - .../src/generate.ps1 | 1 - .../Helpers/DeploymentManagerClientHelper.cs | 233 - .../Helpers/DeploymentManagerTestUtilities.cs | 61 - .../Helpers/RecordedDelegatingHandler.cs | 90 - ....Management.DeploymentManager.Tests.csproj | 46 - .../tests/Properties/AssemblyInfo.cs | 39 - .../TopologyAndRolloutScenarioTest.json | 5904 ----------------- .../ArtifactRoot/Storage.Copy.Parameters.json | 25 - .../ArtifactRoot/Storage.Copy.Template.json | 43 - .../ArtifactRoot/Storage.Parameters.json | 24 - .../Tests/ArtifactRoot/Storage.Template.json | 43 - .../Storage_Invalid.Parameters.json | 24 - .../tests/Tests/EndToEndFunctionalTests.cs | 913 --- sdk/deploymentmanager/ci.mgmt.yml | 24 - .../samples/autorest.tests.md | 13 - .../samples/autorest.tests.md | 13 - .../samples/autorest.tests.md | 13 - sdk/resourcemanager/ci.mgmt.yml | 2 - 241 files changed, 38913 deletions(-) delete mode 100644 sdk/apicenter/Azure.ResourceManager.ApiCenter/samples/autorest.tests.md delete mode 100644 sdk/defendereasm/Azure.ResourceManager.DefenderEasm/samples/autorest.tests.md delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/Azure.ResourceManager.DeploymentManager.sln delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/CHANGELOG.md delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/Directory.Build.props delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/README.md delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/api/Azure.ResourceManager.DeploymentManager.netstandard2.0.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/assets.json delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Azure.ResourceManager.DeploymentManager.Samples.csproj delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ArtifactSourceCollection.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ArtifactSourceResource.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_RolloutCollection.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_RolloutResource.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceResource.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceResourceCollection.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceTopologyResource.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceTopologyResourceCollection.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceUnitResource.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceUnitResourceCollection.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_StepResource.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_StepResourceCollection.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Azure.ResourceManager.DeploymentManager.csproj delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ArmDeploymentManagerModelFactory.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ArtifactSourceCollection.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ArtifactSourceData.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ArtifactSourceResource.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Extensions/DeploymentManagerExtensions.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/LongRunningOperation/DeploymentManagerArmOperation.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/LongRunningOperation/DeploymentManagerArmOperationOfT.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/LongRunningOperation/RolloutOperationSource.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/LongRunningOperation/ServiceUnitResourceOperationSource.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ApiKeyAuthentication.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ApiKeyAuthentication.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ArtifactSourceData.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Authentication.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Authentication.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/DeploymentMode.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/DeploymentMode.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/HealthCheckStepAttributes.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/HealthCheckStepAttributes.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/HealthCheckStepProperties.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/HealthCheckStepProperties.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Identity.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Identity.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Message.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Message.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/PrePostStep.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/PrePostStep.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ResourceOperation.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ResourceOperation.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestAuthLocation.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestAuthLocation.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestAuthType.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestAuthType.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestHealthCheck.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestHealthCheck.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestHealthCheckStepAttributes.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestHealthCheckStepAttributes.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestMatchQuantifier.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestMatchQuantifier.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequest.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequest.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequestAuthentication.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequestAuthentication.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequestMethod.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequestMethod.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestResponse.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestResponse.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestResponseRegex.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestResponseRegex.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutCreateOrUpdateContent.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutCreateOrUpdateContent.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutData.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutIdentityAuthentication.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutIdentityAuthentication.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutOperationInfo.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutOperationInfo.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutStep.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutStep.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/SasAuthentication.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/SasAuthentication.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Service.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Service.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceProperties.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceProperties.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceResourceData.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceTopologyResourceData.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnit.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnit.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitArtifacts.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitArtifacts.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitProperties.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitProperties.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitResourceData.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepGroup.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepGroup.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepOperationInfo.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepOperationInfo.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepProperties.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepProperties.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepResourceData.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepType.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepType.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownAuthentication.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownAuthentication.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownHealthCheckStepAttributes.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownHealthCheckStepAttributes.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownRestRequestAuthentication.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownRestRequestAuthentication.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownStepProperties.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownStepProperties.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/WaitStepAttributes.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/WaitStepAttributes.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/WaitStepProperties.Serialization.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/WaitStepProperties.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ProviderConstants.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/ArtifactSourcesRestOperations.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/RolloutsRestOperations.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/ServiceTopologiesRestOperations.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/ServiceUnitsRestOperations.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/ServicesRestOperations.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/StepsRestOperations.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RolloutCollection.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RolloutData.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RolloutResource.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceResource.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceResourceCollection.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceResourceData.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceTopologyResource.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceTopologyResourceCollection.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceTopologyResourceData.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceUnitResource.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceUnitResourceCollection.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceUnitResourceData.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/StepResource.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/StepResourceCollection.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/StepResourceData.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Properties/AssemblyInfo.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/autorest.md delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/tests/Azure.ResourceManager.DeploymentManager.Tests.csproj delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/tests/DeploymentManagerManagementTestBase.cs delete mode 100644 sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/tests/DeploymentManagerManagementTestEnvironment.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/AzSdk.RP.props delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/Microsoft.Azure.Management.DeploymentManager.sln delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/ReleaseNotes.md delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ArtifactSourcesOperations.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ArtifactSourcesOperationsExtensions.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/AzureDeploymentManagerClient.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IArtifactSourcesOperations.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IAzureDeploymentManagerClient.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IOperations.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IRolloutsOperations.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IServiceTopologiesOperations.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IServiceUnitsOperations.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IServicesOperations.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IStepsOperations.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ApiKeyAuthentication.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ArtifactSource.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ArtifactSourcePropertiesModel.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Authentication.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/AzureEntityResource.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/CloudErrorBody.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/DeploymentMode.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/HealthCheckStepAttributes.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/HealthCheckStepProperties.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Identity.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Message.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Operation.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/OperationDetail.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/OperationsList.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/PrePostStep.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ProxyResource.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Resource.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ResourceOperation.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestAuthLocation.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestHealthCheck.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestHealthCheckStepAttributes.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestMatchQuantifier.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestRequest.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestRequestAuthentication.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestRequestMethod.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestResponse.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestResponseRegex.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Rollout.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutIdentityAuthentication.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutOperationInfo.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutPropertiesModel.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutRequest.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutStep.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutsCreateOrUpdateHeaders.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/SasAuthentication.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Service.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceProperties.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceResource.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceTopologyProperties.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceTopologyResource.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnit.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnitArtifacts.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnitProperties.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnitResource.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnitsCreateOrUpdateHeaders.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/StepGroup.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/StepOperationInfo.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/StepProperties.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/StepResource.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/TrackedResource.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/WaitStepAttributes.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/WaitStepProperties.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Operations.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/OperationsExtensions.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/RolloutsOperations.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/RolloutsOperationsExtensions.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServiceTopologiesOperations.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServiceTopologiesOperationsExtensions.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServiceUnitsOperations.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServiceUnitsOperationsExtensions.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServicesOperations.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServicesOperationsExtensions.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/StepsOperations.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/StepsOperationsExtensions.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Microsoft.Azure.Management.DeploymentManager.csproj delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Properties/AssemblyInfo.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/generate.ps1 delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Helpers/DeploymentManagerClientHelper.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Helpers/DeploymentManagerTestUtilities.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Helpers/RecordedDelegatingHandler.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Microsoft.Azure.Management.DeploymentManager.Tests.csproj delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Properties/AssemblyInfo.cs delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/SessionRecords/EndToEndFunctionalTests/TopologyAndRolloutScenarioTest.json delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage.Copy.Parameters.json delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage.Copy.Template.json delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage.Parameters.json delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage.Template.json delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage_Invalid.Parameters.json delete mode 100644 sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/EndToEndFunctionalTests.cs delete mode 100644 sdk/deploymentmanager/ci.mgmt.yml delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight.Containers/samples/autorest.tests.md delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/autorest.tests.md delete mode 100644 sdk/resourceconnector/Azure.ResourceManager.ResourceConnector/samples/autorest.tests.md diff --git a/sdk/apicenter/Azure.ResourceManager.ApiCenter/samples/autorest.tests.md b/sdk/apicenter/Azure.ResourceManager.ApiCenter/samples/autorest.tests.md deleted file mode 100644 index 7dc5aa3df23e2..0000000000000 --- a/sdk/apicenter/Azure.ResourceManager.ApiCenter/samples/autorest.tests.md +++ /dev/null @@ -1,13 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateTests` to generate code. - -# Azure.ResourceManager.ApiCenter.Tests - -> see https://aka.ms/autorest -``` yaml -require: ../src/autorest.md -include-x-ms-examples-original-file: true -testgen: - sample: true -``` \ No newline at end of file diff --git a/sdk/defendereasm/Azure.ResourceManager.DefenderEasm/samples/autorest.tests.md b/sdk/defendereasm/Azure.ResourceManager.DefenderEasm/samples/autorest.tests.md deleted file mode 100644 index 604b4630b0c11..0000000000000 --- a/sdk/defendereasm/Azure.ResourceManager.DefenderEasm/samples/autorest.tests.md +++ /dev/null @@ -1,13 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateTests` to generate code. - -# Azure.ResourceManager.DefenderEasm.Tests - -> see https://aka.ms/autorest -``` yaml -require: ../src/autorest.md -include-x-ms-examples-original-file: true -testgen: - sample: true -``` \ No newline at end of file diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/Azure.ResourceManager.DeploymentManager.sln b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/Azure.ResourceManager.DeploymentManager.sln deleted file mode 100644 index 72e82a4ad4a81..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/Azure.ResourceManager.DeploymentManager.sln +++ /dev/null @@ -1,65 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.33414.496 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.DeploymentManager", "src\Azure.ResourceManager.DeploymentManager.csproj", "{B62CAE65-5567-4DF4-8B67-ADA3FA3B0FD4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.DeploymentManager.Tests", "tests\Azure.ResourceManager.DeploymentManager.Tests.csproj", "{742B1841-3583-4AD7-8205-59BDF6812852}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.DeploymentManager.Samples", "samples\Azure.ResourceManager.DeploymentManager.Samples.csproj", "{C16B73F9-D3FB-41FF-B8B8-79B2CB9BA1D8}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B62CAE65-5567-4DF4-8B67-ADA3FA3B0FD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B62CAE65-5567-4DF4-8B67-ADA3FA3B0FD4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B62CAE65-5567-4DF4-8B67-ADA3FA3B0FD4}.Debug|x64.ActiveCfg = Debug|Any CPU - {B62CAE65-5567-4DF4-8B67-ADA3FA3B0FD4}.Debug|x64.Build.0 = Debug|Any CPU - {B62CAE65-5567-4DF4-8B67-ADA3FA3B0FD4}.Debug|x86.ActiveCfg = Debug|Any CPU - {B62CAE65-5567-4DF4-8B67-ADA3FA3B0FD4}.Debug|x86.Build.0 = Debug|Any CPU - {B62CAE65-5567-4DF4-8B67-ADA3FA3B0FD4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B62CAE65-5567-4DF4-8B67-ADA3FA3B0FD4}.Release|Any CPU.Build.0 = Release|Any CPU - {B62CAE65-5567-4DF4-8B67-ADA3FA3B0FD4}.Release|x64.ActiveCfg = Release|Any CPU - {B62CAE65-5567-4DF4-8B67-ADA3FA3B0FD4}.Release|x64.Build.0 = Release|Any CPU - {B62CAE65-5567-4DF4-8B67-ADA3FA3B0FD4}.Release|x86.ActiveCfg = Release|Any CPU - {B62CAE65-5567-4DF4-8B67-ADA3FA3B0FD4}.Release|x86.Build.0 = Release|Any CPU - {742B1841-3583-4AD7-8205-59BDF6812852}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {742B1841-3583-4AD7-8205-59BDF6812852}.Debug|Any CPU.Build.0 = Debug|Any CPU - {742B1841-3583-4AD7-8205-59BDF6812852}.Debug|x64.ActiveCfg = Debug|Any CPU - {742B1841-3583-4AD7-8205-59BDF6812852}.Debug|x64.Build.0 = Debug|Any CPU - {742B1841-3583-4AD7-8205-59BDF6812852}.Debug|x86.ActiveCfg = Debug|Any CPU - {742B1841-3583-4AD7-8205-59BDF6812852}.Debug|x86.Build.0 = Debug|Any CPU - {742B1841-3583-4AD7-8205-59BDF6812852}.Release|Any CPU.ActiveCfg = Release|Any CPU - {742B1841-3583-4AD7-8205-59BDF6812852}.Release|Any CPU.Build.0 = Release|Any CPU - {742B1841-3583-4AD7-8205-59BDF6812852}.Release|x64.ActiveCfg = Release|Any CPU - {742B1841-3583-4AD7-8205-59BDF6812852}.Release|x64.Build.0 = Release|Any CPU - {742B1841-3583-4AD7-8205-59BDF6812852}.Release|x86.ActiveCfg = Release|Any CPU - {742B1841-3583-4AD7-8205-59BDF6812852}.Release|x86.Build.0 = Release|Any CPU - {C16B73F9-D3FB-41FF-B8B8-79B2CB9BA1D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C16B73F9-D3FB-41FF-B8B8-79B2CB9BA1D8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C16B73F9-D3FB-41FF-B8B8-79B2CB9BA1D8}.Debug|x64.ActiveCfg = Debug|Any CPU - {C16B73F9-D3FB-41FF-B8B8-79B2CB9BA1D8}.Debug|x64.Build.0 = Debug|Any CPU - {C16B73F9-D3FB-41FF-B8B8-79B2CB9BA1D8}.Debug|x86.ActiveCfg = Debug|Any CPU - {C16B73F9-D3FB-41FF-B8B8-79B2CB9BA1D8}.Debug|x86.Build.0 = Debug|Any CPU - {C16B73F9-D3FB-41FF-B8B8-79B2CB9BA1D8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C16B73F9-D3FB-41FF-B8B8-79B2CB9BA1D8}.Release|Any CPU.Build.0 = Release|Any CPU - {C16B73F9-D3FB-41FF-B8B8-79B2CB9BA1D8}.Release|x64.ActiveCfg = Release|Any CPU - {C16B73F9-D3FB-41FF-B8B8-79B2CB9BA1D8}.Release|x64.Build.0 = Release|Any CPU - {C16B73F9-D3FB-41FF-B8B8-79B2CB9BA1D8}.Release|x86.ActiveCfg = Release|Any CPU - {C16B73F9-D3FB-41FF-B8B8-79B2CB9BA1D8}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {10D9203D-1414-4720-8BA1-5B294F430ABA} - EndGlobalSection -EndGlobal diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/CHANGELOG.md b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/CHANGELOG.md deleted file mode 100644 index a5fd848260b43..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/CHANGELOG.md +++ /dev/null @@ -1,57 +0,0 @@ -# Release History - -## 1.0.0-beta.4 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0-beta.3 (2023-05-29) - -### Features Added - -- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). - -### Other Changes - -- Upgraded dependent Azure.Core to 1.32.0. -- Upgraded dependent Azure.ResourceManager to 1.6.0. - -## 1.0.0-beta.2 (2023-02-16) - -### Features Added - -- Added operation support to `ArmDeploymentManagerModelFactory`. - -### Other Changes - -- Upgraded dependent `Azure.Core` to `1.28.0`. -- Upgraded dependent `Azure.ResourceManager` to `1.4.0`. - -## 1.0.0-beta.1 (2022-09-22) - -### Breaking Changes - -New design of track 2 initial commit. - -### Package Name - -The package name has been changed from `Microsoft.Azure.Management.DeploymentManager` to `Azure.ResourceManager.DeploymentManager`. - -### General New Features - -This package follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: - - - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. - - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. - - HTTP pipeline with custom policies. - - Better error-handling. - - Support uniform telemetry across all languages. - -This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). - -> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/Directory.Build.props b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/Directory.Build.props deleted file mode 100644 index 1a9611bd49242..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/Directory.Build.props +++ /dev/null @@ -1,6 +0,0 @@ - - - - diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/README.md b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/README.md deleted file mode 100644 index 2a712d3a03d7a..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# Microsoft Azure Deployment Manager management client library for .NET - -Microsoft Azure Deployment Manager (ADM) provides a new set of features for Azure Resource Manager and greatly expands your deployment capabilities. ADM allows you to perform staged rollouts of resources, meaning they’re deployed region by region in an ordered fashion. - -This library supports managing Microsoft Azure Deployment Manager resources. - -This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: - - - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. - - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. - - HTTP pipeline with custom policies. - - Better error-handling. - - Support uniform telemetry across all languages. - -## Getting started - -### Install the package - -Install the Microsoft Azure Deployment Manager management library for .NET with [NuGet](https://www.nuget.org/): - -```dotnetcli -dotnet add package Azure.ResourceManager.DeploymentManager --prerelease -``` - -### Prerequisites - -* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). - -### Authenticate the Client - -To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). - -## Key concepts - -Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html). - -## Documentation - -Documentation is available to help you learn how to use this package: - -- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). -- [API References](https://docs.microsoft.com/dotnet/api/?view=azure-dotnet). -- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md). - -## Examples - -Code samples for using the management library for .NET can be found in the following locations -- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples) - -## Troubleshooting - -- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues). -- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags. - -## Next steps - -For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/). - -## Contributing - -For details on contributing to this repository, see the [contributing -guide][cg]. - -This project welcomes contributions and suggestions. Most contributions -require you to agree to a Contributor License Agreement (CLA) declaring -that you have the right to, and actually do, grant us the rights to use -your contribution. For details, visit . - -When you submit a pull request, a CLA-bot will automatically determine -whether you need to provide a CLA and decorate the PR appropriately -(for example, label, comment). Follow the instructions provided by the -bot. You'll only need to do this action once across all repositories -using our CLA. - -This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For -more information, see the [Code of Conduct FAQ][coc_faq] or contact - with any other questions or comments. - - -[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md -[coc]: https://opensource.microsoft.com/codeofconduct/ -[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ \ No newline at end of file diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/api/Azure.ResourceManager.DeploymentManager.netstandard2.0.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/api/Azure.ResourceManager.DeploymentManager.netstandard2.0.cs deleted file mode 100644 index 254b422eeef44..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/api/Azure.ResourceManager.DeploymentManager.netstandard2.0.cs +++ /dev/null @@ -1,529 +0,0 @@ -namespace Azure.ResourceManager.DeploymentManager -{ - public partial class ArtifactSourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ArtifactSourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string artifactSourceName, Azure.ResourceManager.DeploymentManager.ArtifactSourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string artifactSourceName, Azure.ResourceManager.DeploymentManager.ArtifactSourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string artifactSourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string artifactSourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string artifactSourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string artifactSourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string artifactSourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string artifactSourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class ArtifactSourceData : Azure.ResourceManager.Models.TrackedResourceData - { - public ArtifactSourceData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public string ArtifactRoot { get { throw null; } set { } } - public Azure.ResourceManager.DeploymentManager.Models.Authentication Authentication { get { throw null; } set { } } - public string SourceType { get { throw null; } set { } } - } - public partial class ArtifactSourceResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected ArtifactSourceResource() { } - public virtual Azure.ResourceManager.DeploymentManager.ArtifactSourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string artifactSourceName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeploymentManager.ArtifactSourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeploymentManager.ArtifactSourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public static partial class DeploymentManagerExtensions - { - public static Azure.Response GetArtifactSource(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string artifactSourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetArtifactSourceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string artifactSourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.DeploymentManager.ArtifactSourceResource GetArtifactSourceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.DeploymentManager.ArtifactSourceCollection GetArtifactSources(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Response GetRollout(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string rolloutName, int? retryAttempt = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetRolloutAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string rolloutName, int? retryAttempt = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.DeploymentManager.RolloutResource GetRolloutResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.DeploymentManager.RolloutCollection GetRollouts(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.ResourceManager.DeploymentManager.ServiceResource GetServiceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.DeploymentManager.ServiceTopologyResource GetServiceTopologyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetServiceTopologyResource(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string serviceTopologyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetServiceTopologyResourceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string serviceTopologyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.DeploymentManager.ServiceTopologyResourceCollection GetServiceTopologyResources(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.ResourceManager.DeploymentManager.ServiceUnitResource GetServiceUnitResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.DeploymentManager.StepResource GetStepResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetStepResource(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string stepName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetStepResourceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string stepName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.DeploymentManager.StepResourceCollection GetStepResources(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - } - public partial class RolloutCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected RolloutCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string rolloutName, Azure.ResourceManager.DeploymentManager.Models.RolloutCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string rolloutName, Azure.ResourceManager.DeploymentManager.Models.RolloutCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string rolloutName, int? retryAttempt = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string rolloutName, int? retryAttempt = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string rolloutName, int? retryAttempt = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string rolloutName, int? retryAttempt = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string rolloutName, int? retryAttempt = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string rolloutName, int? retryAttempt = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class RolloutData : Azure.ResourceManager.Models.TrackedResourceData - { - public RolloutData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public string ArtifactSourceId { get { throw null; } set { } } - public string BuildVersion { get { throw null; } set { } } - public Azure.ResourceManager.DeploymentManager.Models.Identity Identity { get { throw null; } set { } } - public Azure.ResourceManager.DeploymentManager.Models.RolloutOperationInfo OperationInfo { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Services { get { throw null; } } - public string Status { get { throw null; } } - public System.Collections.Generic.IList StepGroups { get { throw null; } } - public string TargetServiceTopologyId { get { throw null; } set { } } - public int? TotalRetryAttempts { get { throw null; } } - } - public partial class RolloutResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected RolloutResource() { } - public virtual Azure.ResourceManager.DeploymentManager.RolloutData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Cancel(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CancelAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string rolloutName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(int? retryAttempt = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(int? retryAttempt = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Restart(bool? skipSucceeded = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RestartAsync(bool? skipSucceeded = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeploymentManager.Models.RolloutCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeploymentManager.Models.RolloutCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class ServiceResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected ServiceResource() { } - public virtual Azure.ResourceManager.DeploymentManager.ServiceResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetServiceUnitResource(string serviceUnitName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetServiceUnitResourceAsync(string serviceUnitName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.DeploymentManager.ServiceUnitResourceCollection GetServiceUnitResources() { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeploymentManager.ServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeploymentManager.ServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class ServiceResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ServiceResourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string serviceName, Azure.ResourceManager.DeploymentManager.ServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string serviceName, Azure.ResourceManager.DeploymentManager.ServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class ServiceResourceData : Azure.ResourceManager.Models.TrackedResourceData - { - public ServiceResourceData(Azure.Core.AzureLocation location, string targetLocation, string targetSubscriptionId) : base (default(Azure.Core.AzureLocation)) { } - public string TargetLocation { get { throw null; } set { } } - public string TargetSubscriptionId { get { throw null; } set { } } - } - public partial class ServiceTopologyResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected ServiceTopologyResource() { } - public virtual Azure.ResourceManager.DeploymentManager.ServiceTopologyResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceTopologyName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetServiceResource(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetServiceResourceAsync(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.DeploymentManager.ServiceResourceCollection GetServiceResources() { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeploymentManager.ServiceTopologyResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeploymentManager.ServiceTopologyResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class ServiceTopologyResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ServiceTopologyResourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string serviceTopologyName, Azure.ResourceManager.DeploymentManager.ServiceTopologyResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string serviceTopologyName, Azure.ResourceManager.DeploymentManager.ServiceTopologyResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string serviceTopologyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string serviceTopologyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string serviceTopologyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string serviceTopologyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string serviceTopologyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string serviceTopologyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class ServiceTopologyResourceData : Azure.ResourceManager.Models.TrackedResourceData - { - public ServiceTopologyResourceData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public string ArtifactSourceId { get { throw null; } set { } } - } - public partial class ServiceUnitResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected ServiceUnitResource() { } - public virtual Azure.ResourceManager.DeploymentManager.ServiceUnitResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeploymentManager.ServiceUnitResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeploymentManager.ServiceUnitResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class ServiceUnitResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ServiceUnitResourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string serviceUnitName, Azure.ResourceManager.DeploymentManager.ServiceUnitResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string serviceUnitName, Azure.ResourceManager.DeploymentManager.ServiceUnitResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string serviceUnitName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string serviceUnitName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string serviceUnitName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string serviceUnitName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string serviceUnitName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string serviceUnitName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class ServiceUnitResourceData : Azure.ResourceManager.Models.TrackedResourceData - { - public ServiceUnitResourceData(Azure.Core.AzureLocation location, string targetResourceGroup, Azure.ResourceManager.DeploymentManager.Models.DeploymentMode deploymentMode) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.DeploymentManager.Models.ServiceUnitArtifacts Artifacts { get { throw null; } set { } } - public Azure.ResourceManager.DeploymentManager.Models.DeploymentMode DeploymentMode { get { throw null; } set { } } - public string TargetResourceGroup { get { throw null; } set { } } - } - public partial class StepResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected StepResource() { } - public virtual Azure.ResourceManager.DeploymentManager.StepResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string stepName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeploymentManager.StepResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeploymentManager.StepResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class StepResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected StepResourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string stepName, Azure.ResourceManager.DeploymentManager.StepResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string stepName, Azure.ResourceManager.DeploymentManager.StepResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string stepName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string stepName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string stepName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string stepName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string stepName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string stepName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class StepResourceData : Azure.ResourceManager.Models.TrackedResourceData - { - public StepResourceData(Azure.Core.AzureLocation location, Azure.ResourceManager.DeploymentManager.Models.StepProperties properties) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.DeploymentManager.Models.StepProperties Properties { get { throw null; } set { } } - } -} -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class ApiKeyAuthentication : Azure.ResourceManager.DeploymentManager.Models.RestRequestAuthentication - { - public ApiKeyAuthentication(string name, Azure.ResourceManager.DeploymentManager.Models.RestAuthLocation @in, string value) { } - public Azure.ResourceManager.DeploymentManager.Models.RestAuthLocation In { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public string Value { get { throw null; } set { } } - } - public static partial class ArmDeploymentManagerModelFactory - { - public static Azure.ResourceManager.DeploymentManager.ArtifactSourceData ArtifactSourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string sourceType = null, string artifactRoot = null, Azure.ResourceManager.DeploymentManager.Models.Authentication authentication = null) { throw null; } - public static Azure.ResourceManager.DeploymentManager.Models.Message Message(System.DateTimeOffset? timeStamp = default(System.DateTimeOffset?), string messageValue = null) { throw null; } - public static Azure.ResourceManager.DeploymentManager.Models.ResourceOperation ResourceOperation(string resourceName = null, string operationId = null, string resourceType = null, string provisioningState = null, string statusMessage = null, string statusCode = null) { throw null; } - public static Azure.ResourceManager.DeploymentManager.Models.RolloutCreateOrUpdateContent RolloutCreateOrUpdateContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeploymentManager.Models.Identity identity = null, string buildVersion = null, string artifactSourceId = null, string targetServiceTopologyId = null, System.Collections.Generic.IEnumerable stepGroups = null) { throw null; } - public static Azure.ResourceManager.DeploymentManager.RolloutData RolloutData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeploymentManager.Models.Identity identity = null, string buildVersion = null, string artifactSourceId = null, string targetServiceTopologyId = null, System.Collections.Generic.IEnumerable stepGroups = null, string status = null, int? totalRetryAttempts = default(int?), Azure.ResourceManager.DeploymentManager.Models.RolloutOperationInfo operationInfo = null, System.Collections.Generic.IEnumerable services = null) { throw null; } - public static Azure.ResourceManager.DeploymentManager.Models.RolloutOperationInfo RolloutOperationInfo(int? retryAttempt = default(int?), bool? skipSucceededOnRetry = default(bool?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResponseError error = null) { throw null; } - public static Azure.ResourceManager.DeploymentManager.Models.RolloutStep RolloutStep(string name = null, string status = null, string stepGroup = null, Azure.ResourceManager.DeploymentManager.Models.StepOperationInfo operationInfo = null, System.Collections.Generic.IEnumerable resourceOperations = null, System.Collections.Generic.IEnumerable messages = null) { throw null; } - public static Azure.ResourceManager.DeploymentManager.Models.Service Service(string targetLocation = null, string targetSubscriptionId = null, string name = null, System.Collections.Generic.IEnumerable serviceUnits = null) { throw null; } - public static Azure.ResourceManager.DeploymentManager.Models.ServiceProperties ServiceProperties(string targetLocation = null, string targetSubscriptionId = null) { throw null; } - public static Azure.ResourceManager.DeploymentManager.ServiceResourceData ServiceResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string targetLocation = null, string targetSubscriptionId = null) { throw null; } - public static Azure.ResourceManager.DeploymentManager.ServiceTopologyResourceData ServiceTopologyResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string artifactSourceId = null) { throw null; } - public static Azure.ResourceManager.DeploymentManager.Models.ServiceUnit ServiceUnit(string targetResourceGroup = null, Azure.ResourceManager.DeploymentManager.Models.DeploymentMode deploymentMode = Azure.ResourceManager.DeploymentManager.Models.DeploymentMode.Incremental, Azure.ResourceManager.DeploymentManager.Models.ServiceUnitArtifacts artifacts = null, string name = null, System.Collections.Generic.IEnumerable steps = null) { throw null; } - public static Azure.ResourceManager.DeploymentManager.Models.ServiceUnitProperties ServiceUnitProperties(string targetResourceGroup = null, Azure.ResourceManager.DeploymentManager.Models.DeploymentMode deploymentMode = Azure.ResourceManager.DeploymentManager.Models.DeploymentMode.Incremental, Azure.ResourceManager.DeploymentManager.Models.ServiceUnitArtifacts artifacts = null) { throw null; } - public static Azure.ResourceManager.DeploymentManager.ServiceUnitResourceData ServiceUnitResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string targetResourceGroup = null, Azure.ResourceManager.DeploymentManager.Models.DeploymentMode deploymentMode = Azure.ResourceManager.DeploymentManager.Models.DeploymentMode.Incremental, Azure.ResourceManager.DeploymentManager.Models.ServiceUnitArtifacts artifacts = null) { throw null; } - public static Azure.ResourceManager.DeploymentManager.Models.StepOperationInfo StepOperationInfo(string deploymentName = null, string correlationId = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastUpdatedOn = default(System.DateTimeOffset?), Azure.ResponseError error = null) { throw null; } - public static Azure.ResourceManager.DeploymentManager.StepResourceData StepResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeploymentManager.Models.StepProperties properties = null) { throw null; } - } - public abstract partial class Authentication - { - protected Authentication() { } - } - public enum DeploymentMode - { - Incremental = 0, - Complete = 1, - } - public abstract partial class HealthCheckStepAttributes - { - protected HealthCheckStepAttributes(System.TimeSpan healthyStateDuration) { } - public System.TimeSpan HealthyStateDuration { get { throw null; } set { } } - public System.TimeSpan? MaxElasticDuration { get { throw null; } set { } } - public System.TimeSpan? WaitDuration { get { throw null; } set { } } - } - public partial class HealthCheckStepProperties : Azure.ResourceManager.DeploymentManager.Models.StepProperties - { - public HealthCheckStepProperties(Azure.ResourceManager.DeploymentManager.Models.HealthCheckStepAttributes attributes) { } - public Azure.ResourceManager.DeploymentManager.Models.HealthCheckStepAttributes Attributes { get { throw null; } set { } } - } - public partial class Identity - { - public Identity(string identityType, System.Collections.Generic.IEnumerable identityIds) { } - public System.Collections.Generic.IList IdentityIds { get { throw null; } } - public string IdentityType { get { throw null; } set { } } - } - public partial class Message - { - internal Message() { } - public string MessageValue { get { throw null; } } - public System.DateTimeOffset? TimeStamp { get { throw null; } } - } - public partial class PrePostStep - { - public PrePostStep(string stepId) { } - public string StepId { get { throw null; } set { } } - } - public partial class ResourceOperation - { - internal ResourceOperation() { } - public string OperationId { get { throw null; } } - public string ProvisioningState { get { throw null; } } - public string ResourceName { get { throw null; } } - public string ResourceType { get { throw null; } } - public string StatusCode { get { throw null; } } - public string StatusMessage { get { throw null; } } - } - public enum RestAuthLocation - { - Query = 0, - Header = 1, - } - public partial class RestHealthCheck - { - public RestHealthCheck(string name, Azure.ResourceManager.DeploymentManager.Models.RestRequest request) { } - public string Name { get { throw null; } set { } } - public Azure.ResourceManager.DeploymentManager.Models.RestRequest Request { get { throw null; } set { } } - public Azure.ResourceManager.DeploymentManager.Models.RestResponse Response { get { throw null; } set { } } - } - public partial class RestHealthCheckStepAttributes : Azure.ResourceManager.DeploymentManager.Models.HealthCheckStepAttributes - { - public RestHealthCheckStepAttributes(System.TimeSpan healthyStateDuration) : base (default(System.TimeSpan)) { } - public System.Collections.Generic.IList HealthChecks { get { throw null; } } - } - public enum RestMatchQuantifier - { - All = 0, - Any = 1, - } - public partial class RestRequest - { - public RestRequest(Azure.ResourceManager.DeploymentManager.Models.RestRequestMethod method, System.Uri uri, Azure.ResourceManager.DeploymentManager.Models.RestRequestAuthentication authentication) { } - public Azure.ResourceManager.DeploymentManager.Models.RestRequestAuthentication Authentication { get { throw null; } set { } } - public Azure.ResourceManager.DeploymentManager.Models.RestRequestMethod Method { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } - } - public abstract partial class RestRequestAuthentication - { - protected RestRequestAuthentication() { } - } - public enum RestRequestMethod - { - GET = 0, - Post = 1, - } - public partial class RestResponse - { - public RestResponse() { } - public Azure.ResourceManager.DeploymentManager.Models.RestResponseRegex Regex { get { throw null; } set { } } - public System.Collections.Generic.IList SuccessStatusCodes { get { throw null; } } - } - public partial class RestResponseRegex - { - public RestResponseRegex() { } - public System.Collections.Generic.IList Matches { get { throw null; } } - public Azure.ResourceManager.DeploymentManager.Models.RestMatchQuantifier? MatchQuantifier { get { throw null; } set { } } - } - public partial class RolloutCreateOrUpdateContent : Azure.ResourceManager.Models.TrackedResourceData - { - public RolloutCreateOrUpdateContent(Azure.Core.AzureLocation location, Azure.ResourceManager.DeploymentManager.Models.Identity identity, string buildVersion, string targetServiceTopologyId, System.Collections.Generic.IEnumerable stepGroups) : base (default(Azure.Core.AzureLocation)) { } - public string ArtifactSourceId { get { throw null; } set { } } - public string BuildVersion { get { throw null; } set { } } - public Azure.ResourceManager.DeploymentManager.Models.Identity Identity { get { throw null; } set { } } - public System.Collections.Generic.IList StepGroups { get { throw null; } } - public string TargetServiceTopologyId { get { throw null; } set { } } - } - public partial class RolloutIdentityAuthentication : Azure.ResourceManager.DeploymentManager.Models.RestRequestAuthentication - { - public RolloutIdentityAuthentication() { } - } - public partial class RolloutOperationInfo - { - internal RolloutOperationInfo() { } - public System.DateTimeOffset? EndOn { get { throw null; } } - public Azure.ResponseError Error { get { throw null; } } - public int? RetryAttempt { get { throw null; } } - public bool? SkipSucceededOnRetry { get { throw null; } } - public System.DateTimeOffset? StartOn { get { throw null; } } - } - public partial class RolloutStep - { - internal RolloutStep() { } - public System.Collections.Generic.IReadOnlyList Messages { get { throw null; } } - public string Name { get { throw null; } } - public Azure.ResourceManager.DeploymentManager.Models.StepOperationInfo OperationInfo { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ResourceOperations { get { throw null; } } - public string Status { get { throw null; } } - public string StepGroup { get { throw null; } } - } - public partial class SasAuthentication : Azure.ResourceManager.DeploymentManager.Models.Authentication - { - public SasAuthentication() { } - public System.Uri SasUri { get { throw null; } set { } } - } - public partial class Service : Azure.ResourceManager.DeploymentManager.Models.ServiceProperties - { - internal Service() { } - public string Name { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ServiceUnits { get { throw null; } } - } - public partial class ServiceProperties - { - internal ServiceProperties() { } - public string TargetLocation { get { throw null; } } - public string TargetSubscriptionId { get { throw null; } } - } - public partial class ServiceUnit : Azure.ResourceManager.DeploymentManager.Models.ServiceUnitProperties - { - internal ServiceUnit() { } - public string Name { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Steps { get { throw null; } } - } - public partial class ServiceUnitArtifacts - { - public ServiceUnitArtifacts() { } - public string ParametersArtifactSourceRelativePath { get { throw null; } set { } } - public System.Uri ParametersUri { get { throw null; } set { } } - public string TemplateArtifactSourceRelativePath { get { throw null; } set { } } - public System.Uri TemplateUri { get { throw null; } set { } } - } - public partial class ServiceUnitProperties - { - internal ServiceUnitProperties() { } - public Azure.ResourceManager.DeploymentManager.Models.ServiceUnitArtifacts Artifacts { get { throw null; } } - public Azure.ResourceManager.DeploymentManager.Models.DeploymentMode DeploymentMode { get { throw null; } } - public string TargetResourceGroup { get { throw null; } } - } - public partial class StepGroup - { - public StepGroup(string name, string deploymentTargetId) { } - public System.Collections.Generic.IList DependsOnStepGroups { get { throw null; } } - public string DeploymentTargetId { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public System.Collections.Generic.IList PostDeploymentSteps { get { throw null; } } - public System.Collections.Generic.IList PreDeploymentSteps { get { throw null; } } - } - public partial class StepOperationInfo - { - internal StepOperationInfo() { } - public string CorrelationId { get { throw null; } } - public string DeploymentName { get { throw null; } } - public System.DateTimeOffset? EndOn { get { throw null; } } - public Azure.ResponseError Error { get { throw null; } } - public System.DateTimeOffset? LastUpdatedOn { get { throw null; } } - public System.DateTimeOffset? StartOn { get { throw null; } } - } - public abstract partial class StepProperties - { - protected StepProperties() { } - } - public partial class WaitStepAttributes - { - public WaitStepAttributes(System.TimeSpan duration) { } - public System.TimeSpan Duration { get { throw null; } set { } } - } - public partial class WaitStepProperties : Azure.ResourceManager.DeploymentManager.Models.StepProperties - { - public WaitStepProperties(Azure.ResourceManager.DeploymentManager.Models.WaitStepAttributes attributes) { } - public System.TimeSpan? AttributesDuration { get { throw null; } set { } } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/assets.json b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/assets.json deleted file mode 100644 index 0d9395eeea40b..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "net", - "TagPrefix": "net/deploymentmanager/Azure.ResourceManager.DeploymentManager", - "Tag": "" -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Azure.ResourceManager.DeploymentManager.Samples.csproj b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Azure.ResourceManager.DeploymentManager.Samples.csproj deleted file mode 100644 index be109643e6c7c..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Azure.ResourceManager.DeploymentManager.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ArtifactSourceCollection.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ArtifactSourceCollection.cs deleted file mode 100644 index 723d1d8bfcb5e..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ArtifactSourceCollection.cs +++ /dev/null @@ -1,257 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DeploymentManager; -using Azure.ResourceManager.DeploymentManager.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.DeploymentManager.Samples -{ - public partial class Sample_ArtifactSourceCollection - { - // Create artifact source - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateArtifactSource() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsource_createorupdate.json - // this example is just showing the usage of "ArtifactSources_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this ArtifactSourceResource - ArtifactSourceCollection collection = resourceGroupResource.GetArtifactSources(); - - // invoke the operation - string artifactSourceName = "myArtifactSource"; - ArtifactSourceData data = new ArtifactSourceData(new AzureLocation("centralus")) - { - SourceType = "AzureStorage", - Authentication = new SasAuthentication() - { - SasUri = new Uri("https://mystorageaccount.blob.core.windows.net/myartifactsource?st=2018-07-07T14%3A10%3A00Z&se=2019-12-31T15%3A10%3A00Z&sp=rl&sv=2017-04-17&sr=c&sig=Yh2SoJ1NhhLRwCLln7de%2Fkabcdefghijklmno5sWEIk%3D"), - }, - Tags = -{ -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, artifactSourceName, data); - ArtifactSourceResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ArtifactSourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Create artifact source with artifact root, an offset into the storage container - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateArtifactSourceWithArtifactRootAnOffsetIntoTheStorageContainer() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsource_createorupdate_artifactroot.json - // this example is just showing the usage of "ArtifactSources_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this ArtifactSourceResource - ArtifactSourceCollection collection = resourceGroupResource.GetArtifactSources(); - - // invoke the operation - string artifactSourceName = "myArtifactSource"; - ArtifactSourceData data = new ArtifactSourceData(new AzureLocation("centralus")) - { - SourceType = "AzureStorage", - ArtifactRoot = "1.0.0.0", - Authentication = new SasAuthentication() - { - SasUri = new Uri("https://mystorageaccount.blob.core.windows.net/myartifactsource?st=2018-07-07T14%3A10%3A00Z&se=2019-12-31T15%3A10%3A00Z&sp=rl&sv=2017-04-17&sr=c&sig=Yh2SoJ1NhhLRwCLln7de%2Fkabcdefghijklmno5sWEIk%3D"), - }, - Tags = -{ -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, artifactSourceName, data); - ArtifactSourceResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ArtifactSourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get artifact source - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetArtifactSource() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsource_get.json - // this example is just showing the usage of "ArtifactSources_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this ArtifactSourceResource - ArtifactSourceCollection collection = resourceGroupResource.GetArtifactSources(); - - // invoke the operation - string artifactSourceName = "myArtifactSource"; - ArtifactSourceResource result = await collection.GetAsync(artifactSourceName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ArtifactSourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get artifact source - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetArtifactSource() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsource_get.json - // this example is just showing the usage of "ArtifactSources_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this ArtifactSourceResource - ArtifactSourceCollection collection = resourceGroupResource.GetArtifactSources(); - - // invoke the operation - string artifactSourceName = "myArtifactSource"; - bool result = await collection.ExistsAsync(artifactSourceName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get artifact source - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetArtifactSource() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsource_get.json - // this example is just showing the usage of "ArtifactSources_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this ArtifactSourceResource - ArtifactSourceCollection collection = resourceGroupResource.GetArtifactSources(); - - // invoke the operation - string artifactSourceName = "myArtifactSource"; - NullableResponse response = await collection.GetIfExistsAsync(artifactSourceName); - ArtifactSourceResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ArtifactSourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // List steps - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListSteps() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsources_list.json - // this example is just showing the usage of "ArtifactSources_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this ArtifactSourceResource - ArtifactSourceCollection collection = resourceGroupResource.GetArtifactSources(); - - // invoke the operation and iterate over the result - await foreach (ArtifactSourceResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ArtifactSourceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ArtifactSourceResource.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ArtifactSourceResource.cs deleted file mode 100644 index f7475da405e71..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ArtifactSourceResource.cs +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DeploymentManager; -using Azure.ResourceManager.DeploymentManager.Models; - -namespace Azure.ResourceManager.DeploymentManager.Samples -{ - public partial class Sample_ArtifactSourceResource - { - // Create artifact source - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateArtifactSource() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsource_createorupdate.json - // this example is just showing the usage of "ArtifactSources_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ArtifactSourceResource created on azure - // for more information of creating ArtifactSourceResource, please refer to the document of ArtifactSourceResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string artifactSourceName = "myArtifactSource"; - ResourceIdentifier artifactSourceResourceId = ArtifactSourceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, artifactSourceName); - ArtifactSourceResource artifactSource = client.GetArtifactSourceResource(artifactSourceResourceId); - - // invoke the operation - ArtifactSourceData data = new ArtifactSourceData(new AzureLocation("centralus")) - { - SourceType = "AzureStorage", - Authentication = new SasAuthentication() - { - SasUri = new Uri("https://mystorageaccount.blob.core.windows.net/myartifactsource?st=2018-07-07T14%3A10%3A00Z&se=2019-12-31T15%3A10%3A00Z&sp=rl&sv=2017-04-17&sr=c&sig=Yh2SoJ1NhhLRwCLln7de%2Fkabcdefghijklmno5sWEIk%3D"), - }, - Tags = -{ -}, - }; - ArmOperation lro = await artifactSource.UpdateAsync(WaitUntil.Completed, data); - ArtifactSourceResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ArtifactSourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Create artifact source with artifact root, an offset into the storage container - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateArtifactSourceWithArtifactRootAnOffsetIntoTheStorageContainer() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsource_createorupdate_artifactroot.json - // this example is just showing the usage of "ArtifactSources_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ArtifactSourceResource created on azure - // for more information of creating ArtifactSourceResource, please refer to the document of ArtifactSourceResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string artifactSourceName = "myArtifactSource"; - ResourceIdentifier artifactSourceResourceId = ArtifactSourceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, artifactSourceName); - ArtifactSourceResource artifactSource = client.GetArtifactSourceResource(artifactSourceResourceId); - - // invoke the operation - ArtifactSourceData data = new ArtifactSourceData(new AzureLocation("centralus")) - { - SourceType = "AzureStorage", - ArtifactRoot = "1.0.0.0", - Authentication = new SasAuthentication() - { - SasUri = new Uri("https://mystorageaccount.blob.core.windows.net/myartifactsource?st=2018-07-07T14%3A10%3A00Z&se=2019-12-31T15%3A10%3A00Z&sp=rl&sv=2017-04-17&sr=c&sig=Yh2SoJ1NhhLRwCLln7de%2Fkabcdefghijklmno5sWEIk%3D"), - }, - Tags = -{ -}, - }; - ArmOperation lro = await artifactSource.UpdateAsync(WaitUntil.Completed, data); - ArtifactSourceResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ArtifactSourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get artifact source - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetArtifactSource() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsource_get.json - // this example is just showing the usage of "ArtifactSources_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ArtifactSourceResource created on azure - // for more information of creating ArtifactSourceResource, please refer to the document of ArtifactSourceResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string artifactSourceName = "myArtifactSource"; - ResourceIdentifier artifactSourceResourceId = ArtifactSourceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, artifactSourceName); - ArtifactSourceResource artifactSource = client.GetArtifactSourceResource(artifactSourceResourceId); - - // invoke the operation - ArtifactSourceResource result = await artifactSource.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ArtifactSourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Delete artifact source - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteArtifactSource() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsource_delete.json - // this example is just showing the usage of "ArtifactSources_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ArtifactSourceResource created on azure - // for more information of creating ArtifactSourceResource, please refer to the document of ArtifactSourceResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string artifactSourceName = "myArtifactSource"; - ResourceIdentifier artifactSourceResourceId = ArtifactSourceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, artifactSourceName); - ArtifactSourceResource artifactSource = client.GetArtifactSourceResource(artifactSourceResourceId); - - // invoke the operation - await artifactSource.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_RolloutCollection.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_RolloutCollection.cs deleted file mode 100644 index bf92572c4b4ef..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_RolloutCollection.cs +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DeploymentManager; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.DeploymentManager.Samples -{ - public partial class Sample_RolloutCollection - { - // Get rollout - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetRollout() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollout_get.json - // this example is just showing the usage of "Rollouts_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this RolloutResource - RolloutCollection collection = resourceGroupResource.GetRollouts(); - - // invoke the operation - string rolloutName = "myRollout"; - RolloutResource result = await collection.GetAsync(rolloutName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - RolloutData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get rollout - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetRollout() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollout_get.json - // this example is just showing the usage of "Rollouts_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this RolloutResource - RolloutCollection collection = resourceGroupResource.GetRollouts(); - - // invoke the operation - string rolloutName = "myRollout"; - bool result = await collection.ExistsAsync(rolloutName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get rollout - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetRollout() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollout_get.json - // this example is just showing the usage of "Rollouts_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this RolloutResource - RolloutCollection collection = resourceGroupResource.GetRollouts(); - - // invoke the operation - string rolloutName = "myRollout"; - NullableResponse response = await collection.GetIfExistsAsync(rolloutName); - RolloutResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - RolloutData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // List rollouts by resource group - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListRolloutsByResourceGroup() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollouts_list.json - // this example is just showing the usage of "Rollouts_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this RolloutResource - RolloutCollection collection = resourceGroupResource.GetRollouts(); - - // invoke the operation and iterate over the result - await foreach (RolloutResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - RolloutData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_RolloutResource.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_RolloutResource.cs deleted file mode 100644 index 9f19569180dbc..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_RolloutResource.cs +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DeploymentManager; - -namespace Azure.ResourceManager.DeploymentManager.Samples -{ - public partial class Sample_RolloutResource - { - // Get rollout - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetRollout() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollout_get.json - // this example is just showing the usage of "Rollouts_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this RolloutResource created on azure - // for more information of creating RolloutResource, please refer to the document of RolloutResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string rolloutName = "myRollout"; - ResourceIdentifier rolloutResourceId = RolloutResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rolloutName); - RolloutResource rollout = client.GetRolloutResource(rolloutResourceId); - - // invoke the operation - RolloutResource result = await rollout.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - RolloutData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Delete rollout - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteRollout() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollout_delete.json - // this example is just showing the usage of "Rollouts_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this RolloutResource created on azure - // for more information of creating RolloutResource, please refer to the document of RolloutResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string rolloutName = "myRollout"; - ResourceIdentifier rolloutResourceId = RolloutResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rolloutName); - RolloutResource rollout = client.GetRolloutResource(rolloutResourceId); - - // invoke the operation - await rollout.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // Cancel rollout - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Cancel_CancelRollout() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollout_post_cancel.json - // this example is just showing the usage of "Rollouts_Cancel" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this RolloutResource created on azure - // for more information of creating RolloutResource, please refer to the document of RolloutResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string rolloutName = "myRollout"; - ResourceIdentifier rolloutResourceId = RolloutResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rolloutName); - RolloutResource rollout = client.GetRolloutResource(rolloutResourceId); - - // invoke the operation - RolloutResource result = await rollout.CancelAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - RolloutData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Restart rollout - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Restart_RestartRollout() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollout_post_restart.json - // this example is just showing the usage of "Rollouts_Restart" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this RolloutResource created on azure - // for more information of creating RolloutResource, please refer to the document of RolloutResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string rolloutName = "myRollout"; - ResourceIdentifier rolloutResourceId = RolloutResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rolloutName); - RolloutResource rollout = client.GetRolloutResource(rolloutResourceId); - - // invoke the operation - bool? skipSucceeded = true; - RolloutResource result = await rollout.RestartAsync(skipSucceeded: skipSucceeded); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - RolloutData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceResource.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceResource.cs deleted file mode 100644 index c81c8b9ee7e2f..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceResource.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DeploymentManager; - -namespace Azure.ResourceManager.DeploymentManager.Samples -{ - public partial class Sample_ServiceResource - { - // Create service - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateService() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/service_createorupdate.json - // this example is just showing the usage of "Services_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceResource created on azure - // for more information of creating ServiceResource, please refer to the document of ServiceResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - string serviceName = "myService"; - ResourceIdentifier serviceResourceId = ServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName, serviceName); - ServiceResource serviceResource = client.GetServiceResource(serviceResourceId); - - // invoke the operation - ServiceResourceData data = new ServiceResourceData(new AzureLocation("centralus"), "centralus", "600c95c5-3ee5-44fe-b190-ca38a19adcd7") - { - Tags = -{ -}, - }; - ArmOperation lro = await serviceResource.UpdateAsync(WaitUntil.Completed, data); - ServiceResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get service - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetService() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/service_get.json - // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceResource created on azure - // for more information of creating ServiceResource, please refer to the document of ServiceResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - string serviceName = "myService"; - ResourceIdentifier serviceResourceId = ServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName, serviceName); - ServiceResource serviceResource = client.GetServiceResource(serviceResourceId); - - // invoke the operation - ServiceResource result = await serviceResource.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Delete service - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteService() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/service_delete.json - // this example is just showing the usage of "Services_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceResource created on azure - // for more information of creating ServiceResource, please refer to the document of ServiceResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - string serviceName = "myService"; - ResourceIdentifier serviceResourceId = ServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName, serviceName); - ServiceResource serviceResource = client.GetServiceResource(serviceResourceId); - - // invoke the operation - await serviceResource.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceResourceCollection.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceResourceCollection.cs deleted file mode 100644 index 45a259635974a..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceResourceCollection.cs +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DeploymentManager; - -namespace Azure.ResourceManager.DeploymentManager.Samples -{ - public partial class Sample_ServiceResourceCollection - { - // Create service - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateService() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/service_createorupdate.json - // this example is just showing the usage of "Services_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceTopologyResource created on azure - // for more information of creating ServiceTopologyResource, please refer to the document of ServiceTopologyResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - ResourceIdentifier serviceTopologyResourceId = ServiceTopologyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName); - ServiceTopologyResource serviceTopologyResource = client.GetServiceTopologyResource(serviceTopologyResourceId); - - // get the collection of this ServiceResource - ServiceResourceCollection collection = serviceTopologyResource.GetServiceResources(); - - // invoke the operation - string serviceName = "myService"; - ServiceResourceData data = new ServiceResourceData(new AzureLocation("centralus"), "centralus", "600c95c5-3ee5-44fe-b190-ca38a19adcd7") - { - Tags = -{ -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serviceName, data); - ServiceResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get service - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetService() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/service_get.json - // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceTopologyResource created on azure - // for more information of creating ServiceTopologyResource, please refer to the document of ServiceTopologyResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - ResourceIdentifier serviceTopologyResourceId = ServiceTopologyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName); - ServiceTopologyResource serviceTopologyResource = client.GetServiceTopologyResource(serviceTopologyResourceId); - - // get the collection of this ServiceResource - ServiceResourceCollection collection = serviceTopologyResource.GetServiceResources(); - - // invoke the operation - string serviceName = "myService"; - ServiceResource result = await collection.GetAsync(serviceName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get service - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetService() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/service_get.json - // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceTopologyResource created on azure - // for more information of creating ServiceTopologyResource, please refer to the document of ServiceTopologyResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - ResourceIdentifier serviceTopologyResourceId = ServiceTopologyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName); - ServiceTopologyResource serviceTopologyResource = client.GetServiceTopologyResource(serviceTopologyResourceId); - - // get the collection of this ServiceResource - ServiceResourceCollection collection = serviceTopologyResource.GetServiceResources(); - - // invoke the operation - string serviceName = "myService"; - bool result = await collection.ExistsAsync(serviceName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get service - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetService() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/service_get.json - // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceTopologyResource created on azure - // for more information of creating ServiceTopologyResource, please refer to the document of ServiceTopologyResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - ResourceIdentifier serviceTopologyResourceId = ServiceTopologyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName); - ServiceTopologyResource serviceTopologyResource = client.GetServiceTopologyResource(serviceTopologyResourceId); - - // get the collection of this ServiceResource - ServiceResourceCollection collection = serviceTopologyResource.GetServiceResources(); - - // invoke the operation - string serviceName = "myService"; - NullableResponse response = await collection.GetIfExistsAsync(serviceName); - ServiceResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // List services - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListServices() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/services_list.json - // this example is just showing the usage of "Services_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceTopologyResource created on azure - // for more information of creating ServiceTopologyResource, please refer to the document of ServiceTopologyResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - ResourceIdentifier serviceTopologyResourceId = ServiceTopologyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName); - ServiceTopologyResource serviceTopologyResource = client.GetServiceTopologyResource(serviceTopologyResourceId); - - // get the collection of this ServiceResource - ServiceResourceCollection collection = serviceTopologyResource.GetServiceResources(); - - // invoke the operation and iterate over the result - await foreach (ServiceResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceResourceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceTopologyResource.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceTopologyResource.cs deleted file mode 100644 index 83c9ee9c4746a..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceTopologyResource.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DeploymentManager; - -namespace Azure.ResourceManager.DeploymentManager.Samples -{ - public partial class Sample_ServiceTopologyResource - { - // Create a topology with Artifact Source - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateATopologyWithArtifactSource() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopology_createorupdate.json - // this example is just showing the usage of "ServiceTopologies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceTopologyResource created on azure - // for more information of creating ServiceTopologyResource, please refer to the document of ServiceTopologyResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - ResourceIdentifier serviceTopologyResourceId = ServiceTopologyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName); - ServiceTopologyResource serviceTopologyResource = client.GetServiceTopologyResource(serviceTopologyResourceId); - - // invoke the operation - ServiceTopologyResourceData data = new ServiceTopologyResourceData(new AzureLocation("centralus")) - { - ArtifactSourceId = "Microsoft.DeploymentManager/artifactSources/myArtifactSource", - Tags = -{ -}, - }; - ArmOperation lro = await serviceTopologyResource.UpdateAsync(WaitUntil.Completed, data); - ServiceTopologyResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceTopologyResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Create a topology without Artifact Source - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateATopologyWithoutArtifactSource() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopology_createorupdate_noartifactsource.json - // this example is just showing the usage of "ServiceTopologies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceTopologyResource created on azure - // for more information of creating ServiceTopologyResource, please refer to the document of ServiceTopologyResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - ResourceIdentifier serviceTopologyResourceId = ServiceTopologyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName); - ServiceTopologyResource serviceTopologyResource = client.GetServiceTopologyResource(serviceTopologyResourceId); - - // invoke the operation - ServiceTopologyResourceData data = new ServiceTopologyResourceData(new AzureLocation("centralus")) - { - Tags = -{ -}, - }; - ArmOperation lro = await serviceTopologyResource.UpdateAsync(WaitUntil.Completed, data); - ServiceTopologyResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceTopologyResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get topology - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetTopology() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopology_get.json - // this example is just showing the usage of "ServiceTopologies_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceTopologyResource created on azure - // for more information of creating ServiceTopologyResource, please refer to the document of ServiceTopologyResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - ResourceIdentifier serviceTopologyResourceId = ServiceTopologyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName); - ServiceTopologyResource serviceTopologyResource = client.GetServiceTopologyResource(serviceTopologyResourceId); - - // invoke the operation - ServiceTopologyResource result = await serviceTopologyResource.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceTopologyResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Delete topology - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteTopology() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopology_delete.json - // this example is just showing the usage of "ServiceTopologies_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceTopologyResource created on azure - // for more information of creating ServiceTopologyResource, please refer to the document of ServiceTopologyResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - ResourceIdentifier serviceTopologyResourceId = ServiceTopologyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName); - ServiceTopologyResource serviceTopologyResource = client.GetServiceTopologyResource(serviceTopologyResourceId); - - // invoke the operation - await serviceTopologyResource.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceTopologyResourceCollection.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceTopologyResourceCollection.cs deleted file mode 100644 index 6abb2d4818311..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceTopologyResourceCollection.cs +++ /dev/null @@ -1,246 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DeploymentManager; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.DeploymentManager.Samples -{ - public partial class Sample_ServiceTopologyResourceCollection - { - // Create a topology with Artifact Source - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateATopologyWithArtifactSource() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopology_createorupdate.json - // this example is just showing the usage of "ServiceTopologies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this ServiceTopologyResource - ServiceTopologyResourceCollection collection = resourceGroupResource.GetServiceTopologyResources(); - - // invoke the operation - string serviceTopologyName = "myTopology"; - ServiceTopologyResourceData data = new ServiceTopologyResourceData(new AzureLocation("centralus")) - { - ArtifactSourceId = "Microsoft.DeploymentManager/artifactSources/myArtifactSource", - Tags = -{ -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serviceTopologyName, data); - ServiceTopologyResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceTopologyResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Create a topology without Artifact Source - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateATopologyWithoutArtifactSource() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopology_createorupdate_noartifactsource.json - // this example is just showing the usage of "ServiceTopologies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this ServiceTopologyResource - ServiceTopologyResourceCollection collection = resourceGroupResource.GetServiceTopologyResources(); - - // invoke the operation - string serviceTopologyName = "myTopology"; - ServiceTopologyResourceData data = new ServiceTopologyResourceData(new AzureLocation("centralus")) - { - Tags = -{ -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serviceTopologyName, data); - ServiceTopologyResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceTopologyResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get topology - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetTopology() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopology_get.json - // this example is just showing the usage of "ServiceTopologies_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this ServiceTopologyResource - ServiceTopologyResourceCollection collection = resourceGroupResource.GetServiceTopologyResources(); - - // invoke the operation - string serviceTopologyName = "myTopology"; - ServiceTopologyResource result = await collection.GetAsync(serviceTopologyName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceTopologyResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get topology - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetTopology() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopology_get.json - // this example is just showing the usage of "ServiceTopologies_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this ServiceTopologyResource - ServiceTopologyResourceCollection collection = resourceGroupResource.GetServiceTopologyResources(); - - // invoke the operation - string serviceTopologyName = "myTopology"; - bool result = await collection.ExistsAsync(serviceTopologyName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get topology - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetTopology() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopology_get.json - // this example is just showing the usage of "ServiceTopologies_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this ServiceTopologyResource - ServiceTopologyResourceCollection collection = resourceGroupResource.GetServiceTopologyResources(); - - // invoke the operation - string serviceTopologyName = "myTopology"; - NullableResponse response = await collection.GetIfExistsAsync(serviceTopologyName); - ServiceTopologyResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceTopologyResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // List topologies - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListTopologies() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopologies_list.json - // this example is just showing the usage of "ServiceTopologies_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this ServiceTopologyResource - ServiceTopologyResourceCollection collection = resourceGroupResource.GetServiceTopologyResources(); - - // invoke the operation and iterate over the result - await foreach (ServiceTopologyResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceTopologyResourceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceUnitResource.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceUnitResource.cs deleted file mode 100644 index 29b321538e3d2..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceUnitResource.cs +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DeploymentManager; -using Azure.ResourceManager.DeploymentManager.Models; - -namespace Azure.ResourceManager.DeploymentManager.Samples -{ - public partial class Sample_ServiceUnitResource - { - // Create service unit using SAS URIs - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateServiceUnitUsingSASURIs() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunit_createorupdate_noartifactsource.json - // this example is just showing the usage of "ServiceUnits_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceUnitResource created on azure - // for more information of creating ServiceUnitResource, please refer to the document of ServiceUnitResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - string serviceName = "myService"; - string serviceUnitName = "myServiceUnit"; - ResourceIdentifier serviceUnitResourceId = ServiceUnitResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName, serviceName, serviceUnitName); - ServiceUnitResource serviceUnitResource = client.GetServiceUnitResource(serviceUnitResourceId); - - // invoke the operation - ServiceUnitResourceData data = new ServiceUnitResourceData(new AzureLocation("centralus"), "myDeploymentResourceGroup", DeploymentMode.Incremental) - { - Artifacts = new ServiceUnitArtifacts() - { - TemplateUri = new Uri("https://mystorageaccount.blob.core.windows.net/myartifactsource/templates/myTopologyUnit.template.json?st=2018-07-07T14%3A10%3A00Z&se=2019-12-31T15%3A10%3A00Z&sp=rl&sv=2017-04-17&sr=c&sig=Yh2SoJ1NhhLRwCLln7de%2Fkabcdefghijklmno5sWEIk%3D"), - ParametersUri = new Uri("https://mystorageaccount.blob.core.windows.net/myartifactsource/parameter/myTopologyUnit.parameters.json?st=2018-07-07T14%3A10%3A00Z&se=2019-12-31T15%3A10%3A00Z&sp=rl&sv=2017-04-17&sr=c&sig=Yh2SoJ1NhhLRwCLln7de%2Fkabcdefghijklmno5sWEIk%3D"), - }, - Tags = -{ -}, - }; - ArmOperation lro = await serviceUnitResource.UpdateAsync(WaitUntil.Completed, data); - ServiceUnitResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceUnitResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Create service unit using relative paths into the artifact source - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateServiceUnitUsingRelativePathsIntoTheArtifactSource() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunit_createorupdate.json - // this example is just showing the usage of "ServiceUnits_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceUnitResource created on azure - // for more information of creating ServiceUnitResource, please refer to the document of ServiceUnitResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - string serviceName = "myService"; - string serviceUnitName = "myServiceUnit"; - ResourceIdentifier serviceUnitResourceId = ServiceUnitResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName, serviceName, serviceUnitName); - ServiceUnitResource serviceUnitResource = client.GetServiceUnitResource(serviceUnitResourceId); - - // invoke the operation - ServiceUnitResourceData data = new ServiceUnitResourceData(new AzureLocation("centralus"), "myDeploymentResourceGroup", DeploymentMode.Incremental) - { - Artifacts = new ServiceUnitArtifacts() - { - TemplateArtifactSourceRelativePath = "templates/myTopologyUnit.template.json", - ParametersArtifactSourceRelativePath = "parameter/myTopologyUnit.parameters.json", - }, - Tags = -{ -}, - }; - ArmOperation lro = await serviceUnitResource.UpdateAsync(WaitUntil.Completed, data); - ServiceUnitResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceUnitResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get service unit - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetServiceUnit() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunit_get.json - // this example is just showing the usage of "ServiceUnits_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceUnitResource created on azure - // for more information of creating ServiceUnitResource, please refer to the document of ServiceUnitResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - string serviceName = "myService"; - string serviceUnitName = "myServiceUnit"; - ResourceIdentifier serviceUnitResourceId = ServiceUnitResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName, serviceName, serviceUnitName); - ServiceUnitResource serviceUnitResource = client.GetServiceUnitResource(serviceUnitResourceId); - - // invoke the operation - ServiceUnitResource result = await serviceUnitResource.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceUnitResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Delete service unit - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteServiceUnit() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunit_delete.json - // this example is just showing the usage of "ServiceUnits_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceUnitResource created on azure - // for more information of creating ServiceUnitResource, please refer to the document of ServiceUnitResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - string serviceName = "myService"; - string serviceUnitName = "myServiceUnit"; - ResourceIdentifier serviceUnitResourceId = ServiceUnitResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName, serviceName, serviceUnitName); - ServiceUnitResource serviceUnitResource = client.GetServiceUnitResource(serviceUnitResourceId); - - // invoke the operation - await serviceUnitResource.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceUnitResourceCollection.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceUnitResourceCollection.cs deleted file mode 100644 index 20a704c3dae08..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_ServiceUnitResourceCollection.cs +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DeploymentManager; -using Azure.ResourceManager.DeploymentManager.Models; - -namespace Azure.ResourceManager.DeploymentManager.Samples -{ - public partial class Sample_ServiceUnitResourceCollection - { - // Create service unit using SAS URIs - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateServiceUnitUsingSASURIs() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunit_createorupdate_noartifactsource.json - // this example is just showing the usage of "ServiceUnits_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceResource created on azure - // for more information of creating ServiceResource, please refer to the document of ServiceResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - string serviceName = "myService"; - ResourceIdentifier serviceResourceId = ServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName, serviceName); - ServiceResource serviceResource = client.GetServiceResource(serviceResourceId); - - // get the collection of this ServiceUnitResource - ServiceUnitResourceCollection collection = serviceResource.GetServiceUnitResources(); - - // invoke the operation - string serviceUnitName = "myServiceUnit"; - ServiceUnitResourceData data = new ServiceUnitResourceData(new AzureLocation("centralus"), "myDeploymentResourceGroup", DeploymentMode.Incremental) - { - Artifacts = new ServiceUnitArtifacts() - { - TemplateUri = new Uri("https://mystorageaccount.blob.core.windows.net/myartifactsource/templates/myTopologyUnit.template.json?st=2018-07-07T14%3A10%3A00Z&se=2019-12-31T15%3A10%3A00Z&sp=rl&sv=2017-04-17&sr=c&sig=Yh2SoJ1NhhLRwCLln7de%2Fkabcdefghijklmno5sWEIk%3D"), - ParametersUri = new Uri("https://mystorageaccount.blob.core.windows.net/myartifactsource/parameter/myTopologyUnit.parameters.json?st=2018-07-07T14%3A10%3A00Z&se=2019-12-31T15%3A10%3A00Z&sp=rl&sv=2017-04-17&sr=c&sig=Yh2SoJ1NhhLRwCLln7de%2Fkabcdefghijklmno5sWEIk%3D"), - }, - Tags = -{ -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serviceUnitName, data); - ServiceUnitResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceUnitResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Create service unit using relative paths into the artifact source - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateServiceUnitUsingRelativePathsIntoTheArtifactSource() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunit_createorupdate.json - // this example is just showing the usage of "ServiceUnits_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceResource created on azure - // for more information of creating ServiceResource, please refer to the document of ServiceResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - string serviceName = "myService"; - ResourceIdentifier serviceResourceId = ServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName, serviceName); - ServiceResource serviceResource = client.GetServiceResource(serviceResourceId); - - // get the collection of this ServiceUnitResource - ServiceUnitResourceCollection collection = serviceResource.GetServiceUnitResources(); - - // invoke the operation - string serviceUnitName = "myServiceUnit"; - ServiceUnitResourceData data = new ServiceUnitResourceData(new AzureLocation("centralus"), "myDeploymentResourceGroup", DeploymentMode.Incremental) - { - Artifacts = new ServiceUnitArtifacts() - { - TemplateArtifactSourceRelativePath = "templates/myTopologyUnit.template.json", - ParametersArtifactSourceRelativePath = "parameter/myTopologyUnit.parameters.json", - }, - Tags = -{ -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serviceUnitName, data); - ServiceUnitResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceUnitResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get service unit - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetServiceUnit() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunit_get.json - // this example is just showing the usage of "ServiceUnits_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceResource created on azure - // for more information of creating ServiceResource, please refer to the document of ServiceResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - string serviceName = "myService"; - ResourceIdentifier serviceResourceId = ServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName, serviceName); - ServiceResource serviceResource = client.GetServiceResource(serviceResourceId); - - // get the collection of this ServiceUnitResource - ServiceUnitResourceCollection collection = serviceResource.GetServiceUnitResources(); - - // invoke the operation - string serviceUnitName = "myServiceUnit"; - ServiceUnitResource result = await collection.GetAsync(serviceUnitName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceUnitResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get service unit - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetServiceUnit() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunit_get.json - // this example is just showing the usage of "ServiceUnits_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceResource created on azure - // for more information of creating ServiceResource, please refer to the document of ServiceResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - string serviceName = "myService"; - ResourceIdentifier serviceResourceId = ServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName, serviceName); - ServiceResource serviceResource = client.GetServiceResource(serviceResourceId); - - // get the collection of this ServiceUnitResource - ServiceUnitResourceCollection collection = serviceResource.GetServiceUnitResources(); - - // invoke the operation - string serviceUnitName = "myServiceUnit"; - bool result = await collection.ExistsAsync(serviceUnitName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get service unit - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetServiceUnit() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunit_get.json - // this example is just showing the usage of "ServiceUnits_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceResource created on azure - // for more information of creating ServiceResource, please refer to the document of ServiceResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - string serviceName = "myService"; - ResourceIdentifier serviceResourceId = ServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName, serviceName); - ServiceResource serviceResource = client.GetServiceResource(serviceResourceId); - - // get the collection of this ServiceUnitResource - ServiceUnitResourceCollection collection = serviceResource.GetServiceUnitResources(); - - // invoke the operation - string serviceUnitName = "myServiceUnit"; - NullableResponse response = await collection.GetIfExistsAsync(serviceUnitName); - ServiceUnitResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceUnitResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // List service units - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListServiceUnits() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunits_list.json - // this example is just showing the usage of "ServiceUnits_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ServiceResource created on azure - // for more information of creating ServiceResource, please refer to the document of ServiceResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string serviceTopologyName = "myTopology"; - string serviceName = "myService"; - ResourceIdentifier serviceResourceId = ServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceTopologyName, serviceName); - ServiceResource serviceResource = client.GetServiceResource(serviceResourceId); - - // get the collection of this ServiceUnitResource - ServiceUnitResourceCollection collection = serviceResource.GetServiceUnitResources(); - - // invoke the operation and iterate over the result - await foreach (ServiceUnitResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceUnitResourceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_StepResource.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_StepResource.cs deleted file mode 100644 index e4a00e67d6638..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_StepResource.cs +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using System.Xml; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DeploymentManager; -using Azure.ResourceManager.DeploymentManager.Models; - -namespace Azure.ResourceManager.DeploymentManager.Samples -{ - public partial class Sample_StepResource - { - // Create health check step - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateHealthCheckStep() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/step_health_check_createorupdate.json - // this example is just showing the usage of "Steps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this StepResource created on azure - // for more information of creating StepResource, please refer to the document of StepResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string stepName = "healthCheckStep"; - ResourceIdentifier stepResourceId = StepResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, stepName); - StepResource stepResource = client.GetStepResource(stepResourceId); - - // invoke the operation - StepResourceData data = new StepResourceData(new AzureLocation("centralus"), new HealthCheckStepProperties(new RestHealthCheckStepAttributes(XmlConvert.ToTimeSpan("PT2H")) - { - HealthChecks = -{ -new RestHealthCheck("appHealth",new RestRequest(RestRequestMethod.GET,new Uri("https://resthealth.healthservice.com/api/applications/contosoApp/healthStatus"),new ApiKeyAuthentication("Code",RestAuthLocation.Query,"NBCapiMOBQyAAbCkeytoPadnvO0eGHmidwFz5rXpappznKp3Jt7LLg=="))) -{ -Response = new RestResponse() -{ -SuccessStatusCodes = -{ -"OK" -}, -Regex = new RestResponseRegex() -{ -Matches = -{ -"(?i)Contoso-App","(?i)\"health_status\":((.|\n)*)\"(green|yellow)\"","(?mi)^(\"application_host\": 94781052)$" -}, -MatchQuantifier = RestMatchQuantifier.All, -}, -}, -},new RestHealthCheck("serviceHealth",new RestRequest(RestRequestMethod.GET,new Uri("https://resthealth.healthservice.com/api/services/contosoService/healthStatus"),new ApiKeyAuthentication("code",RestAuthLocation.Header,"NBCapiMOBQyAAbCkeytoPadnvO0eGHmidwFz5rXpappznKp3Jt7LLg=="))) -{ -Response = new RestResponse() -{ -SuccessStatusCodes = -{ -"OK" -}, -Regex = new RestResponseRegex() -{ -Matches = -{ -"(?i)Contoso-Service-EndToEnd","(?i)\"health_status\":((.|\n)*)\"(green)\"" -}, -MatchQuantifier = RestMatchQuantifier.All, -}, -}, -} -}, - WaitDuration = XmlConvert.ToTimeSpan("PT15M"), - MaxElasticDuration = XmlConvert.ToTimeSpan("PT30M"), - })) - { - Tags = -{ -}, - }; - ArmOperation lro = await stepResource.UpdateAsync(WaitUntil.Completed, data); - StepResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - StepResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Create wait step - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateWaitStep() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/step_wait_createorupdate.json - // this example is just showing the usage of "Steps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this StepResource created on azure - // for more information of creating StepResource, please refer to the document of StepResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string stepName = "waitStep"; - ResourceIdentifier stepResourceId = StepResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, stepName); - StepResource stepResource = client.GetStepResource(stepResourceId); - - // invoke the operation - StepResourceData data = new StepResourceData(new AzureLocation("centralus"), new WaitStepProperties(new WaitStepAttributes(XmlConvert.ToTimeSpan("PT20M")))) - { - Tags = -{ -}, - }; - ArmOperation lro = await stepResource.UpdateAsync(WaitUntil.Completed, data); - StepResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - StepResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get deployment step - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetDeploymentStep() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/step_get.json - // this example is just showing the usage of "Steps_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this StepResource created on azure - // for more information of creating StepResource, please refer to the document of StepResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string stepName = "waitStep"; - ResourceIdentifier stepResourceId = StepResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, stepName); - StepResource stepResource = client.GetStepResource(stepResourceId); - - // invoke the operation - StepResource result = await stepResource.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - StepResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Delete deployment step - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteDeploymentStep() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/step_delete.json - // this example is just showing the usage of "Steps_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this StepResource created on azure - // for more information of creating StepResource, please refer to the document of StepResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - string stepName = "deploymentStep1"; - ResourceIdentifier stepResourceId = StepResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, stepName); - StepResource stepResource = client.GetStepResource(stepResourceId); - - // invoke the operation - await stepResource.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_StepResourceCollection.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_StepResourceCollection.cs deleted file mode 100644 index 0a81365d4e46d..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/samples/Generated/Samples/Sample_StepResourceCollection.cs +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using System.Xml; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DeploymentManager; -using Azure.ResourceManager.DeploymentManager.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.DeploymentManager.Samples -{ - public partial class Sample_StepResourceCollection - { - // Create health check step - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateHealthCheckStep() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/step_health_check_createorupdate.json - // this example is just showing the usage of "Steps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this StepResource - StepResourceCollection collection = resourceGroupResource.GetStepResources(); - - // invoke the operation - string stepName = "healthCheckStep"; - StepResourceData data = new StepResourceData(new AzureLocation("centralus"), new HealthCheckStepProperties(new RestHealthCheckStepAttributes(XmlConvert.ToTimeSpan("PT2H")) - { - HealthChecks = -{ -new RestHealthCheck("appHealth",new RestRequest(RestRequestMethod.GET,new Uri("https://resthealth.healthservice.com/api/applications/contosoApp/healthStatus"),new ApiKeyAuthentication("Code",RestAuthLocation.Query,"NBCapiMOBQyAAbCkeytoPadnvO0eGHmidwFz5rXpappznKp3Jt7LLg=="))) -{ -Response = new RestResponse() -{ -SuccessStatusCodes = -{ -"OK" -}, -Regex = new RestResponseRegex() -{ -Matches = -{ -"(?i)Contoso-App","(?i)\"health_status\":((.|\n)*)\"(green|yellow)\"","(?mi)^(\"application_host\": 94781052)$" -}, -MatchQuantifier = RestMatchQuantifier.All, -}, -}, -},new RestHealthCheck("serviceHealth",new RestRequest(RestRequestMethod.GET,new Uri("https://resthealth.healthservice.com/api/services/contosoService/healthStatus"),new ApiKeyAuthentication("code",RestAuthLocation.Header,"NBCapiMOBQyAAbCkeytoPadnvO0eGHmidwFz5rXpappznKp3Jt7LLg=="))) -{ -Response = new RestResponse() -{ -SuccessStatusCodes = -{ -"OK" -}, -Regex = new RestResponseRegex() -{ -Matches = -{ -"(?i)Contoso-Service-EndToEnd","(?i)\"health_status\":((.|\n)*)\"(green)\"" -}, -MatchQuantifier = RestMatchQuantifier.All, -}, -}, -} -}, - WaitDuration = XmlConvert.ToTimeSpan("PT15M"), - MaxElasticDuration = XmlConvert.ToTimeSpan("PT30M"), - })) - { - Tags = -{ -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, stepName, data); - StepResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - StepResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Create wait step - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateWaitStep() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/step_wait_createorupdate.json - // this example is just showing the usage of "Steps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this StepResource - StepResourceCollection collection = resourceGroupResource.GetStepResources(); - - // invoke the operation - string stepName = "waitStep"; - StepResourceData data = new StepResourceData(new AzureLocation("centralus"), new WaitStepProperties(new WaitStepAttributes(XmlConvert.ToTimeSpan("PT20M")))) - { - Tags = -{ -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, stepName, data); - StepResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - StepResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get deployment step - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetDeploymentStep() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/step_get.json - // this example is just showing the usage of "Steps_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this StepResource - StepResourceCollection collection = resourceGroupResource.GetStepResources(); - - // invoke the operation - string stepName = "waitStep"; - StepResource result = await collection.GetAsync(stepName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - StepResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get deployment step - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetDeploymentStep() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/step_get.json - // this example is just showing the usage of "Steps_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this StepResource - StepResourceCollection collection = resourceGroupResource.GetStepResources(); - - // invoke the operation - string stepName = "waitStep"; - bool result = await collection.ExistsAsync(stepName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get deployment step - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetDeploymentStep() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/step_get.json - // this example is just showing the usage of "Steps_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this StepResource - StepResourceCollection collection = resourceGroupResource.GetStepResources(); - - // invoke the operation - string stepName = "waitStep"; - NullableResponse response = await collection.GetIfExistsAsync(stepName); - StepResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - StepResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // List steps - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListSteps() - { - // Generated from example definition: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/steps_list.json - // this example is just showing the usage of "Steps_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "caac1590-e859-444f-a9e0-62091c0f5929"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this StepResource - StepResourceCollection collection = resourceGroupResource.GetStepResources(); - - // invoke the operation and iterate over the result - await foreach (StepResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - StepResourceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Azure.ResourceManager.DeploymentManager.csproj b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Azure.ResourceManager.DeploymentManager.csproj deleted file mode 100644 index 3bc8524511850..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Azure.ResourceManager.DeploymentManager.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - 1.0.0-beta.4 - Azure.ResourceManager.DeploymentManager - Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.DeploymentManager. - azure;management;arm;resource manager;deploymentmanager - - diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ArmDeploymentManagerModelFactory.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ArmDeploymentManagerModelFactory.cs deleted file mode 100644 index 9e0e35d3840d9..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ArmDeploymentManagerModelFactory.cs +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using Azure; -using Azure.Core; -using Azure.ResourceManager.DeploymentManager; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// Model factory for models. - public static partial class ArmDeploymentManagerModelFactory - { - /// Initializes a new instance of ServiceTopologyResourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The resource Id of the artifact source that contains the artifacts that can be referenced in the service units. - /// A new instance for mocking. - public static ServiceTopologyResourceData ServiceTopologyResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string artifactSourceId = null) - { - tags ??= new Dictionary(); - - return new ServiceTopologyResourceData(id, name, resourceType, systemData, tags, location, artifactSourceId); - } - - /// Initializes a new instance of ServiceResourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// 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. - /// A new instance for mocking. - public static ServiceResourceData ServiceResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string targetLocation = null, string targetSubscriptionId = null) - { - tags ??= new Dictionary(); - - return new ServiceResourceData(id, name, resourceType, systemData, tags, location, targetLocation, targetSubscriptionId); - } - - /// Initializes a new instance of ServiceProperties. - /// 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. - /// or is null. - /// A new instance for mocking. - public static ServiceProperties ServiceProperties(string targetLocation = null, string targetSubscriptionId = null) - { - if (targetLocation == null) - { - throw new ArgumentNullException(nameof(targetLocation)); - } - if (targetSubscriptionId == null) - { - throw new ArgumentNullException(nameof(targetSubscriptionId)); - } - - return new ServiceProperties(targetLocation, targetSubscriptionId); - } - - /// Initializes a new instance of ServiceUnitResourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// 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. - /// The artifacts for the service unit. - /// A new instance for mocking. - public static ServiceUnitResourceData ServiceUnitResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string targetResourceGroup = null, DeploymentMode deploymentMode = default, ServiceUnitArtifacts artifacts = null) - { - tags ??= new Dictionary(); - - return new ServiceUnitResourceData(id, name, resourceType, systemData, tags, location, targetResourceGroup, deploymentMode, artifacts); - } - - /// Initializes a new instance of ServiceUnitProperties. - /// 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. - /// The artifacts for the service unit. - /// A new instance for mocking. - public static ServiceUnitProperties ServiceUnitProperties(string targetResourceGroup = null, DeploymentMode deploymentMode = default, ServiceUnitArtifacts artifacts = null) - { - return new ServiceUnitProperties(targetResourceGroup, deploymentMode, artifacts); - } - - /// Initializes a new instance of StepResourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// - /// The properties that define the step. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// A new instance for mocking. - public static StepResourceData StepResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, StepProperties properties = null) - { - tags ??= new Dictionary(); - - return new StepResourceData(id, name, resourceType, systemData, tags, location, properties); - } - - /// Initializes a new instance of RolloutCreateOrUpdateContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Identity for the resource. - /// The version of the build being deployed. - /// The reference to the artifact source resource Id where the payload is located. - /// 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. - /// A new instance for mocking. - public static RolloutCreateOrUpdateContent RolloutCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, Identity identity = null, string buildVersion = null, string artifactSourceId = null, string targetServiceTopologyId = null, IEnumerable stepGroups = null) - { - tags ??= new Dictionary(); - stepGroups ??= new List(); - - return new RolloutCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, identity, buildVersion, artifactSourceId, targetServiceTopologyId, stepGroups?.ToList()); - } - - /// Initializes a new instance of RolloutData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Identity for the resource. - /// The version of the build being deployed. - /// The reference to the artifact source resource Id where the payload is located. - /// 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. - /// 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. - /// A new instance for mocking. - public static RolloutData RolloutData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, Identity identity = null, string buildVersion = null, string artifactSourceId = null, string targetServiceTopologyId = null, IEnumerable stepGroups = null, string status = null, int? totalRetryAttempts = null, RolloutOperationInfo operationInfo = null, IEnumerable services = null) - { - tags ??= new Dictionary(); - stepGroups ??= new List(); - services ??= new List(); - - return new RolloutData(id, name, resourceType, systemData, tags, location, identity, buildVersion, artifactSourceId, targetServiceTopologyId, stepGroups?.ToList(), status, totalRetryAttempts, operationInfo, services?.ToList()); - } - - /// Initializes a new instance of RolloutOperationInfo. - /// 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. - /// A new instance for mocking. - public static RolloutOperationInfo RolloutOperationInfo(int? retryAttempt = null, bool? skipSucceededOnRetry = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, ResponseError error = null) - { - return new RolloutOperationInfo(retryAttempt, skipSucceededOnRetry, startOn, endOn, error); - } - - /// Initializes a new instance of Service. - /// 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. - /// or is null. - /// A new instance for mocking. - public static Service Service(string targetLocation = null, string targetSubscriptionId = null, string name = null, IEnumerable serviceUnits = null) - { - if (targetLocation == null) - { - throw new ArgumentNullException(nameof(targetLocation)); - } - if (targetSubscriptionId == null) - { - throw new ArgumentNullException(nameof(targetSubscriptionId)); - } - serviceUnits ??= new List(); - - return new Service(targetLocation, targetSubscriptionId, name, serviceUnits?.ToList()); - } - - /// Initializes a new instance of ServiceUnit. - /// 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. - /// The artifacts for the service unit. - /// Name of the service unit. - /// Detailed step information, if present. - /// A new instance for mocking. - public static ServiceUnit ServiceUnit(string targetResourceGroup = null, DeploymentMode deploymentMode = default, ServiceUnitArtifacts artifacts = null, string name = null, IEnumerable steps = null) - { - steps ??= new List(); - - return new ServiceUnit(targetResourceGroup, deploymentMode, artifacts, name, steps?.ToList()); - } - - /// Initializes a new instance of RolloutStep. - /// 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. - /// A new instance for mocking. - public static RolloutStep RolloutStep(string name = null, string status = null, string stepGroup = null, StepOperationInfo operationInfo = null, IEnumerable resourceOperations = null, IEnumerable messages = null) - { - resourceOperations ??= new List(); - messages ??= new List(); - - return new RolloutStep(name, status, stepGroup, operationInfo, resourceOperations?.ToList(), messages?.ToList()); - } - - /// Initializes a new instance of StepOperationInfo. - /// 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. - /// A new instance for mocking. - public static StepOperationInfo StepOperationInfo(string deploymentName = null, string correlationId = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, DateTimeOffset? lastUpdatedOn = null, ResponseError error = null) - { - return new StepOperationInfo(deploymentName, correlationId, startOn, endOn, lastUpdatedOn, error); - } - - /// Initializes a new instance of ResourceOperation. - /// 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. - /// A new instance for mocking. - public static ResourceOperation ResourceOperation(string resourceName = null, string operationId = null, string resourceType = null, string provisioningState = null, string statusMessage = null, string statusCode = null) - { - return new ResourceOperation(resourceName, operationId, resourceType, provisioningState, statusMessage, statusCode); - } - - /// Initializes a new instance of Message. - /// Time in UTC this message was provided. - /// The actual message text. - /// A new instance for mocking. - public static Message Message(DateTimeOffset? timeStamp = null, string messageValue = null) - { - return new Message(timeStamp, messageValue); - } - - /// Initializes a new instance of ArtifactSourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The type of artifact source used. - /// 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. - /// - /// The authentication method to use to access the artifact source. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - /// A new instance for mocking. - public static ArtifactSourceData ArtifactSourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string sourceType = null, string artifactRoot = null, Authentication authentication = null) - { - tags ??= new Dictionary(); - - return new ArtifactSourceData(id, name, resourceType, systemData, tags, location, sourceType, artifactRoot, authentication); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ArtifactSourceCollection.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ArtifactSourceCollection.cs deleted file mode 100644 index 8b724d83cf36c..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ArtifactSourceCollection.cs +++ /dev/null @@ -1,414 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get an instance call the GetArtifactSources method from an instance of . - /// - public partial class ArtifactSourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _artifactSourceClientDiagnostics; - private readonly ArtifactSourcesRestOperations _artifactSourceRestClient; - - /// Initializes a new instance of the class for mocking. - protected ArtifactSourceCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal ArtifactSourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _artifactSourceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DeploymentManager", ArtifactSourceResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ArtifactSourceResource.ResourceType, out string artifactSourceApiVersion); - _artifactSourceRestClient = new ArtifactSourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, artifactSourceApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); - } - - /// - /// Synchronously creates a new artifact source or updates an existing artifact source. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the artifact source. - /// Source object that defines the resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string artifactSourceName, ArtifactSourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(artifactSourceName, nameof(artifactSourceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _artifactSourceRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, artifactSourceName, data, cancellationToken).ConfigureAwait(false); - var operation = new DeploymentManagerArmOperation(Response.FromValue(new ArtifactSourceResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Synchronously creates a new artifact source or updates an existing artifact source. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the artifact source. - /// Source object that defines the resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string artifactSourceName, ArtifactSourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(artifactSourceName, nameof(artifactSourceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _artifactSourceRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, artifactSourceName, data, cancellationToken); - var operation = new DeploymentManagerArmOperation(Response.FromValue(new ArtifactSourceResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets an artifact source. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_Get - /// - /// - /// - /// The name of the artifact source. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string artifactSourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(artifactSourceName, nameof(artifactSourceName)); - - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceCollection.Get"); - scope.Start(); - try - { - var response = await _artifactSourceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, artifactSourceName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ArtifactSourceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets an artifact source. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_Get - /// - /// - /// - /// The name of the artifact source. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string artifactSourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(artifactSourceName, nameof(artifactSourceName)); - - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceCollection.Get"); - scope.Start(); - try - { - var response = _artifactSourceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, artifactSourceName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ArtifactSourceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists the artifact sources in a resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources - /// - /// - /// Operation Id - /// ArtifactSources_List - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _artifactSourceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new ArtifactSourceResource(Client, ArtifactSourceData.DeserializeArtifactSourceData(e)), _artifactSourceClientDiagnostics, Pipeline, "ArtifactSourceCollection.GetAll", "", null, cancellationToken); - } - - /// - /// Lists the artifact sources in a resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources - /// - /// - /// Operation Id - /// ArtifactSources_List - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _artifactSourceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new ArtifactSourceResource(Client, ArtifactSourceData.DeserializeArtifactSourceData(e)), _artifactSourceClientDiagnostics, Pipeline, "ArtifactSourceCollection.GetAll", "", null, cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_Get - /// - /// - /// - /// The name of the artifact source. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string artifactSourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(artifactSourceName, nameof(artifactSourceName)); - - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceCollection.Exists"); - scope.Start(); - try - { - var response = await _artifactSourceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, artifactSourceName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_Get - /// - /// - /// - /// The name of the artifact source. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string artifactSourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(artifactSourceName, nameof(artifactSourceName)); - - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceCollection.Exists"); - scope.Start(); - try - { - var response = _artifactSourceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, artifactSourceName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_Get - /// - /// - /// - /// The name of the artifact source. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string artifactSourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(artifactSourceName, nameof(artifactSourceName)); - - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _artifactSourceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, artifactSourceName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new ArtifactSourceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_Get - /// - /// - /// - /// The name of the artifact source. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string artifactSourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(artifactSourceName, nameof(artifactSourceName)); - - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceCollection.GetIfExists"); - scope.Start(); - try - { - var response = _artifactSourceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, artifactSourceName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new ArtifactSourceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ArtifactSourceData.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ArtifactSourceData.cs deleted file mode 100644 index d4f3b9aa28906..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ArtifactSourceData.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.DeploymentManager.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// - /// A class representing the ArtifactSource data model. - /// The resource that defines the source location where the artifacts are located. - /// - public partial class ArtifactSourceData : TrackedResourceData - { - /// Initializes a new instance of ArtifactSourceData. - /// The location. - public ArtifactSourceData(AzureLocation location) : base(location) - { - } - - /// Initializes a new instance of ArtifactSourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The type of artifact source used. - /// 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. - /// - /// The authentication method to use to access the artifact source. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - internal ArtifactSourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string sourceType, string artifactRoot, Authentication authentication) : base(id, name, resourceType, systemData, tags, location) - { - SourceType = sourceType; - ArtifactRoot = artifactRoot; - Authentication = authentication; - } - - /// The type of artifact source used. - public string SourceType { get; set; } - /// 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 string ArtifactRoot { get; set; } - /// - /// The authentication method to use to access the artifact source. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - public Authentication Authentication { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ArtifactSourceResource.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ArtifactSourceResource.cs deleted file mode 100644 index 3845dfbd87688..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ArtifactSourceResource.cs +++ /dev/null @@ -1,587 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// - /// A Class representing an ArtifactSource along with the instance operations that can be performed on it. - /// If you have a you can construct an - /// from an instance of using the GetArtifactSourceResource method. - /// Otherwise you can get one from its parent resource using the GetArtifactSource method. - /// - public partial class ArtifactSourceResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string artifactSourceName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _artifactSourceClientDiagnostics; - private readonly ArtifactSourcesRestOperations _artifactSourceRestClient; - private readonly ArtifactSourceData _data; - - /// Initializes a new instance of the class for mocking. - protected ArtifactSourceResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal ArtifactSourceResource(ArmClient client, ArtifactSourceData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal ArtifactSourceResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _artifactSourceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DeploymentManager", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string artifactSourceApiVersion); - _artifactSourceRestClient = new ArtifactSourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, artifactSourceApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DeploymentManager/artifactSources"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual ArtifactSourceData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets an artifact source. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_Get - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceResource.Get"); - scope.Start(); - try - { - var response = await _artifactSourceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ArtifactSourceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets an artifact source. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_Get - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceResource.Get"); - scope.Start(); - try - { - var response = _artifactSourceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ArtifactSourceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes an artifact source. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceResource.Delete"); - scope.Start(); - try - { - var response = await _artifactSourceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DeploymentManagerArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes an artifact source. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceResource.Delete"); - scope.Start(); - try - { - var response = _artifactSourceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new DeploymentManagerArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Synchronously creates a new artifact source or updates an existing artifact source. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Source object that defines the resource. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ArtifactSourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceResource.Update"); - scope.Start(); - try - { - var response = await _artifactSourceRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new DeploymentManagerArmOperation(Response.FromValue(new ArtifactSourceResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Synchronously creates a new artifact source or updates an existing artifact source. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Source object that defines the resource. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ArtifactSourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceResource.Update"); - scope.Start(); - try - { - var response = _artifactSourceRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken); - var operation = new DeploymentManagerArmOperation(Response.FromValue(new ArtifactSourceResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _artifactSourceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ArtifactSourceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _artifactSourceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new ArtifactSourceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags[key] = value; - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _artifactSourceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ArtifactSourceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _artifactSourceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new ArtifactSourceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _artifactSourceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ArtifactSourceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _artifactSourceClientDiagnostics.CreateScope("ArtifactSourceResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _artifactSourceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new ArtifactSourceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.Remove(key); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Extensions/DeploymentManagerExtensions.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Extensions/DeploymentManagerExtensions.cs deleted file mode 100644 index c51c47829e7db..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Extensions/DeploymentManagerExtensions.cs +++ /dev/null @@ -1,376 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// A class to add extension methods to Azure.ResourceManager.DeploymentManager. - public static partial class DeploymentManagerExtensions - { - private static ResourceGroupResourceExtensionClient GetResourceGroupResourceExtensionClient(ArmResource resource) - { - return resource.GetCachedClient(client => - { - return new ResourceGroupResourceExtensionClient(client, resource.Id); - }); - } - - private static ResourceGroupResourceExtensionClient GetResourceGroupResourceExtensionClient(ArmClient client, ResourceIdentifier scope) - { - return client.GetResourceClient(() => - { - return new ResourceGroupResourceExtensionClient(client, scope); - }); - } - #region ServiceTopologyResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static ServiceTopologyResource GetServiceTopologyResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - ServiceTopologyResource.ValidateResourceId(id); - return new ServiceTopologyResource(client, id); - } - ); - } - #endregion - - #region ServiceResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static ServiceResource GetServiceResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - ServiceResource.ValidateResourceId(id); - return new ServiceResource(client, id); - } - ); - } - #endregion - - #region ServiceUnitResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static ServiceUnitResource GetServiceUnitResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - ServiceUnitResource.ValidateResourceId(id); - return new ServiceUnitResource(client, id); - } - ); - } - #endregion - - #region StepResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static StepResource GetStepResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - StepResource.ValidateResourceId(id); - return new StepResource(client, id); - } - ); - } - #endregion - - #region RolloutResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static RolloutResource GetRolloutResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - RolloutResource.ValidateResourceId(id); - return new RolloutResource(client, id); - } - ); - } - #endregion - - #region ArtifactSourceResource - /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static ArtifactSourceResource GetArtifactSourceResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - ArtifactSourceResource.ValidateResourceId(id); - return new ArtifactSourceResource(client, id); - } - ); - } - #endregion - - /// Gets a collection of ServiceTopologyResources in the ResourceGroupResource. - /// The instance the method will execute against. - /// An object representing collection of ServiceTopologyResources and their operations over a ServiceTopologyResource. - public static ServiceTopologyResourceCollection GetServiceTopologyResources(this ResourceGroupResource resourceGroupResource) - { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetServiceTopologyResources(); - } - - /// - /// Gets the service topology. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_Get - /// - /// - /// - /// The instance the method will execute against. - /// The name of the service topology . - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public static async Task> GetServiceTopologyResourceAsync(this ResourceGroupResource resourceGroupResource, string serviceTopologyName, CancellationToken cancellationToken = default) - { - return await resourceGroupResource.GetServiceTopologyResources().GetAsync(serviceTopologyName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the service topology. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_Get - /// - /// - /// - /// The instance the method will execute against. - /// The name of the service topology . - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public static Response GetServiceTopologyResource(this ResourceGroupResource resourceGroupResource, string serviceTopologyName, CancellationToken cancellationToken = default) - { - return resourceGroupResource.GetServiceTopologyResources().Get(serviceTopologyName, cancellationToken); - } - - /// Gets a collection of StepResources in the ResourceGroupResource. - /// The instance the method will execute against. - /// An object representing collection of StepResources and their operations over a StepResource. - public static StepResourceCollection GetStepResources(this ResourceGroupResource resourceGroupResource) - { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetStepResources(); - } - - /// - /// Gets the step. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_Get - /// - /// - /// - /// The instance the method will execute against. - /// The name of the deployment step. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public static async Task> GetStepResourceAsync(this ResourceGroupResource resourceGroupResource, string stepName, CancellationToken cancellationToken = default) - { - return await resourceGroupResource.GetStepResources().GetAsync(stepName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the step. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_Get - /// - /// - /// - /// The instance the method will execute against. - /// The name of the deployment step. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public static Response GetStepResource(this ResourceGroupResource resourceGroupResource, string stepName, CancellationToken cancellationToken = default) - { - return resourceGroupResource.GetStepResources().Get(stepName, cancellationToken); - } - - /// Gets a collection of RolloutResources in the ResourceGroupResource. - /// The instance the method will execute against. - /// An object representing collection of RolloutResources and their operations over a RolloutResource. - public static RolloutCollection GetRollouts(this ResourceGroupResource resourceGroupResource) - { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetRollouts(); - } - - /// - /// Gets detailed information of a rollout. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_Get - /// - /// - /// - /// The instance the method will execute against. - /// 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 to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public static async Task> GetRolloutAsync(this ResourceGroupResource resourceGroupResource, string rolloutName, int? retryAttempt = null, CancellationToken cancellationToken = default) - { - return await resourceGroupResource.GetRollouts().GetAsync(rolloutName, retryAttempt, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets detailed information of a rollout. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_Get - /// - /// - /// - /// The instance the method will execute against. - /// 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 to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public static Response GetRollout(this ResourceGroupResource resourceGroupResource, string rolloutName, int? retryAttempt = null, CancellationToken cancellationToken = default) - { - return resourceGroupResource.GetRollouts().Get(rolloutName, retryAttempt, cancellationToken); - } - - /// Gets a collection of ArtifactSourceResources in the ResourceGroupResource. - /// The instance the method will execute against. - /// An object representing collection of ArtifactSourceResources and their operations over a ArtifactSourceResource. - public static ArtifactSourceCollection GetArtifactSources(this ResourceGroupResource resourceGroupResource) - { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetArtifactSources(); - } - - /// - /// Gets an artifact source. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_Get - /// - /// - /// - /// The instance the method will execute against. - /// The name of the artifact source. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public static async Task> GetArtifactSourceAsync(this ResourceGroupResource resourceGroupResource, string artifactSourceName, CancellationToken cancellationToken = default) - { - return await resourceGroupResource.GetArtifactSources().GetAsync(artifactSourceName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets an artifact source. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName} - /// - /// - /// Operation Id - /// ArtifactSources_Get - /// - /// - /// - /// The instance the method will execute against. - /// The name of the artifact source. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public static Response GetArtifactSource(this ResourceGroupResource resourceGroupResource, string artifactSourceName, CancellationToken cancellationToken = default) - { - return resourceGroupResource.GetArtifactSources().Get(artifactSourceName, cancellationToken); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs deleted file mode 100644 index 2cc8093668ac7..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// A class to add extension methods to ResourceGroupResource. - internal partial class ResourceGroupResourceExtensionClient : ArmResource - { - /// Initializes a new instance of the class for mocking. - protected ResourceGroupResourceExtensionClient() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal ResourceGroupResourceExtensionClient(ArmClient client, ResourceIdentifier id) : base(client, id) - { - } - - private string GetApiVersionOrNull(ResourceType resourceType) - { - TryGetApiVersion(resourceType, out string apiVersion); - return apiVersion; - } - - /// Gets a collection of ServiceTopologyResources in the ResourceGroupResource. - /// An object representing collection of ServiceTopologyResources and their operations over a ServiceTopologyResource. - public virtual ServiceTopologyResourceCollection GetServiceTopologyResources() - { - return GetCachedClient(Client => new ServiceTopologyResourceCollection(Client, Id)); - } - - /// Gets a collection of StepResources in the ResourceGroupResource. - /// An object representing collection of StepResources and their operations over a StepResource. - public virtual StepResourceCollection GetStepResources() - { - return GetCachedClient(Client => new StepResourceCollection(Client, Id)); - } - - /// Gets a collection of RolloutResources in the ResourceGroupResource. - /// An object representing collection of RolloutResources and their operations over a RolloutResource. - public virtual RolloutCollection GetRollouts() - { - return GetCachedClient(Client => new RolloutCollection(Client, Id)); - } - - /// Gets a collection of ArtifactSourceResources in the ResourceGroupResource. - /// An object representing collection of ArtifactSourceResources and their operations over a ArtifactSourceResource. - public virtual ArtifactSourceCollection GetArtifactSources() - { - return GetCachedClient(Client => new ArtifactSourceCollection(Client, Id)); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/LongRunningOperation/DeploymentManagerArmOperation.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/LongRunningOperation/DeploymentManagerArmOperation.cs deleted file mode 100644 index b681ce57b6c2c..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/LongRunningOperation/DeploymentManagerArmOperation.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.DeploymentManager -{ -#pragma warning disable SA1649 // File name should match first type name - internal class DeploymentManagerArmOperation : ArmOperation -#pragma warning restore SA1649 // File name should match first type name - { - private readonly OperationInternal _operation; - - /// Initializes a new instance of DeploymentManagerArmOperation for mocking. - protected DeploymentManagerArmOperation() - { - } - - internal DeploymentManagerArmOperation(Response response) - { - _operation = OperationInternal.Succeeded(response); - } - - internal DeploymentManagerArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) - { - var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); - _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "DeploymentManagerArmOperation", fallbackStrategy: new SequentialDelayStrategy()); - } - - /// -#pragma warning disable CA1822 - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public override string Id => throw new NotImplementedException(); -#pragma warning restore CA1822 - - /// - public override bool HasCompleted => _operation.HasCompleted; - - /// - public override Response GetRawResponse() => _operation.RawResponse; - - /// - public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); - - /// - public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); - - /// - public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); - - /// - public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); - - /// - public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); - - /// - public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/LongRunningOperation/DeploymentManagerArmOperationOfT.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/LongRunningOperation/DeploymentManagerArmOperationOfT.cs deleted file mode 100644 index d558a0a0006c0..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/LongRunningOperation/DeploymentManagerArmOperationOfT.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.DeploymentManager -{ -#pragma warning disable SA1649 // File name should match first type name - internal class DeploymentManagerArmOperation : ArmOperation -#pragma warning restore SA1649 // File name should match first type name - { - private readonly OperationInternal _operation; - - /// Initializes a new instance of DeploymentManagerArmOperation for mocking. - protected DeploymentManagerArmOperation() - { - } - - internal DeploymentManagerArmOperation(Response response) - { - _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); - } - - internal DeploymentManagerArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) - { - var nextLinkOperation = NextLinkOperationImplementation.Create(source, pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); - _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "DeploymentManagerArmOperation", fallbackStrategy: new SequentialDelayStrategy()); - } - - /// -#pragma warning disable CA1822 - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public override string Id => throw new NotImplementedException(); -#pragma warning restore CA1822 - - /// - public override T Value => _operation.Value; - - /// - public override bool HasValue => _operation.HasValue; - - /// - public override bool HasCompleted => _operation.HasCompleted; - - /// - public override Response GetRawResponse() => _operation.RawResponse; - - /// - public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); - - /// - public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); - - /// - public override Response WaitForCompletion(CancellationToken cancellationToken = default) => _operation.WaitForCompletion(cancellationToken); - - /// - public override Response WaitForCompletion(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletion(pollingInterval, cancellationToken); - - /// - public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); - - /// - public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/LongRunningOperation/RolloutOperationSource.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/LongRunningOperation/RolloutOperationSource.cs deleted file mode 100644 index 9343611c18ecf..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/LongRunningOperation/RolloutOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.DeploymentManager -{ - internal class RolloutOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal RolloutOperationSource(ArmClient client) - { - _client = client; - } - - RolloutResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = RolloutData.DeserializeRolloutData(document.RootElement); - return new RolloutResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = RolloutData.DeserializeRolloutData(document.RootElement); - return new RolloutResource(_client, data); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/LongRunningOperation/ServiceUnitResourceOperationSource.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/LongRunningOperation/ServiceUnitResourceOperationSource.cs deleted file mode 100644 index d50dd30faea76..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/LongRunningOperation/ServiceUnitResourceOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.DeploymentManager -{ - internal class ServiceUnitResourceOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal ServiceUnitResourceOperationSource(ArmClient client) - { - _client = client; - } - - ServiceUnitResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = ServiceUnitResourceData.DeserializeServiceUnitResourceData(document.RootElement); - return new ServiceUnitResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = ServiceUnitResourceData.DeserializeServiceUnitResourceData(document.RootElement); - return new ServiceUnitResource(_client, data); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ApiKeyAuthentication.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ApiKeyAuthentication.Serialization.cs deleted file mode 100644 index f17024ca64189..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ApiKeyAuthentication.Serialization.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class ApiKeyAuthentication : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("in"u8); - writer.WriteStringValue(In.ToSerialString()); - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToSerialString()); - writer.WriteEndObject(); - } - - internal static ApiKeyAuthentication DeserializeApiKeyAuthentication(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - RestAuthLocation @in = default; - string value = default; - RestAuthType type = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("in"u8)) - { - @in = property.Value.GetString().ToRestAuthLocation(); - continue; - } - if (property.NameEquals("value"u8)) - { - value = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToRestAuthType(); - continue; - } - } - return new ApiKeyAuthentication(type, name, @in, value); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ApiKeyAuthentication.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ApiKeyAuthentication.cs deleted file mode 100644 index e71a73e489b91..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ApiKeyAuthentication.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// ApiKey authentication gives a name and a value that can be included in either the request header or query parameters. - public partial class ApiKeyAuthentication : RestRequestAuthentication - { - /// Initializes a new instance of ApiKeyAuthentication. - /// The key name of the authentication key/value pair. - /// The location of the authentication key/value pair in the request. - /// The value of the authentication key/value pair. - /// or is null. - public ApiKeyAuthentication(string name, RestAuthLocation @in, string value) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(value, nameof(value)); - - Name = name; - In = @in; - Value = value; - AuthType = RestAuthType.ApiKey; - } - - /// Initializes a new instance of ApiKeyAuthentication. - /// The authentication type. - /// The key name of the authentication key/value pair. - /// The location of the authentication key/value pair in the request. - /// The value of the authentication key/value pair. - internal ApiKeyAuthentication(RestAuthType authType, string name, RestAuthLocation @in, string value) : base(authType) - { - Name = name; - In = @in; - Value = value; - AuthType = authType; - } - - /// The key name of the authentication key/value pair. - public string Name { get; set; } - /// The location of the authentication key/value pair in the request. - public RestAuthLocation In { get; set; } - /// The value of the authentication key/value pair. - public string Value { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ArtifactSourceData.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ArtifactSourceData.Serialization.cs deleted file mode 100644 index dc3a5d51d2e27..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ArtifactSourceData.Serialization.cs +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DeploymentManager.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DeploymentManager -{ - public partial class ArtifactSourceData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(SourceType)) - { - writer.WritePropertyName("sourceType"u8); - writer.WriteStringValue(SourceType); - } - if (Optional.IsDefined(ArtifactRoot)) - { - writer.WritePropertyName("artifactRoot"u8); - writer.WriteStringValue(ArtifactRoot); - } - if (Optional.IsDefined(Authentication)) - { - writer.WritePropertyName("authentication"u8); - writer.WriteObjectValue(Authentication); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static ArtifactSourceData DeserializeArtifactSourceData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - Optional sourceType = default; - Optional artifactRoot = default; - Optional authentication = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("sourceType"u8)) - { - sourceType = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("artifactRoot"u8)) - { - artifactRoot = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("authentication"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authentication = Authentication.DeserializeAuthentication(property0.Value); - continue; - } - } - continue; - } - } - return new ArtifactSourceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sourceType.Value, artifactRoot.Value, authentication.Value); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Authentication.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Authentication.Serialization.cs deleted file mode 100644 index 11a53861e674a..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Authentication.Serialization.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class Authentication : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthenticationType); - writer.WriteEndObject(); - } - - internal static Authentication DeserializeAuthentication(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Sas": return SasAuthentication.DeserializeSasAuthentication(element); - } - } - return UnknownAuthentication.DeserializeUnknownAuthentication(element); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Authentication.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Authentication.cs deleted file mode 100644 index 23c71cdd9e9dd..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Authentication.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// - /// Defines the authentication method and properties to access the artifacts. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - public abstract partial class Authentication - { - /// Initializes a new instance of Authentication. - protected Authentication() - { - } - - /// Initializes a new instance of Authentication. - /// The authentication type. - internal Authentication(string authenticationType) - { - AuthenticationType = authenticationType; - } - - /// The authentication type. - internal string AuthenticationType { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/DeploymentMode.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/DeploymentMode.Serialization.cs deleted file mode 100644 index 2ce51138834dd..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/DeploymentMode.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - internal static partial class DeploymentModeExtensions - { - public static string ToSerialString(this DeploymentMode value) => value switch - { - DeploymentMode.Incremental => "Incremental", - DeploymentMode.Complete => "Complete", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DeploymentMode value.") - }; - - public static DeploymentMode ToDeploymentMode(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Incremental")) return DeploymentMode.Incremental; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Complete")) return DeploymentMode.Complete; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DeploymentMode value."); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/DeploymentMode.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/DeploymentMode.cs deleted file mode 100644 index 5070e70d56835..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/DeploymentMode.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// Describes the type of ARM deployment to be performed on the resource. - public enum DeploymentMode - { - /// Incremental. - Incremental, - /// Complete. - Complete - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/HealthCheckStepAttributes.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/HealthCheckStepAttributes.Serialization.cs deleted file mode 100644 index 2b97e9a2aa83d..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/HealthCheckStepAttributes.Serialization.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class HealthCheckStepAttributes : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(HealthCheckStepAttributesType); - if (Optional.IsDefined(WaitDuration)) - { - writer.WritePropertyName("waitDuration"u8); - writer.WriteStringValue(WaitDuration.Value, "P"); - } - if (Optional.IsDefined(MaxElasticDuration)) - { - writer.WritePropertyName("maxElasticDuration"u8); - writer.WriteStringValue(MaxElasticDuration.Value, "P"); - } - writer.WritePropertyName("healthyStateDuration"u8); - writer.WriteStringValue(HealthyStateDuration, "P"); - writer.WriteEndObject(); - } - - internal static HealthCheckStepAttributes DeserializeHealthCheckStepAttributes(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "REST": return RestHealthCheckStepAttributes.DeserializeRestHealthCheckStepAttributes(element); - } - } - return UnknownHealthCheckStepAttributes.DeserializeUnknownHealthCheckStepAttributes(element); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/HealthCheckStepAttributes.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/HealthCheckStepAttributes.cs deleted file mode 100644 index afb11c48ba0d7..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/HealthCheckStepAttributes.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// - /// The attributes for the health check step. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - public abstract partial class HealthCheckStepAttributes - { - /// Initializes a new instance of HealthCheckStepAttributes. - /// The duration in ISO 8601 format for which the resource is expected to be continuously healthy. If maxElasticDuration is specified, healthy state duration is enforced after the detection of first healthy signal. - protected HealthCheckStepAttributes(TimeSpan healthyStateDuration) - { - HealthyStateDuration = healthyStateDuration; - } - - /// Initializes a new instance of HealthCheckStepAttributes. - /// The type of health check. - /// The duration in ISO 8601 format for which health check waits idly without any checks. - /// The duration in ISO 8601 format for which the health check waits for the resource to become healthy. Health check fails if it doesn't. Health check starts to enforce healthyStateDuration once resource becomes healthy. - /// The duration in ISO 8601 format for which the resource is expected to be continuously healthy. If maxElasticDuration is specified, healthy state duration is enforced after the detection of first healthy signal. - internal HealthCheckStepAttributes(string healthCheckStepAttributesType, TimeSpan? waitDuration, TimeSpan? maxElasticDuration, TimeSpan healthyStateDuration) - { - HealthCheckStepAttributesType = healthCheckStepAttributesType; - WaitDuration = waitDuration; - MaxElasticDuration = maxElasticDuration; - HealthyStateDuration = healthyStateDuration; - } - - /// The type of health check. - internal string HealthCheckStepAttributesType { get; set; } - /// The duration in ISO 8601 format for which health check waits idly without any checks. - public TimeSpan? WaitDuration { get; set; } - /// The duration in ISO 8601 format for which the health check waits for the resource to become healthy. Health check fails if it doesn't. Health check starts to enforce healthyStateDuration once resource becomes healthy. - public TimeSpan? MaxElasticDuration { get; set; } - /// The duration in ISO 8601 format for which the resource is expected to be continuously healthy. If maxElasticDuration is specified, healthy state duration is enforced after the detection of first healthy signal. - public TimeSpan HealthyStateDuration { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/HealthCheckStepProperties.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/HealthCheckStepProperties.Serialization.cs deleted file mode 100644 index d931b6320263a..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/HealthCheckStepProperties.Serialization.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class HealthCheckStepProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("attributes"u8); - writer.WriteObjectValue(Attributes); - writer.WritePropertyName("stepType"u8); - writer.WriteStringValue(StepType.ToSerialString()); - writer.WriteEndObject(); - } - - internal static HealthCheckStepProperties DeserializeHealthCheckStepProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - HealthCheckStepAttributes attributes = default; - StepType stepType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("attributes"u8)) - { - attributes = HealthCheckStepAttributes.DeserializeHealthCheckStepAttributes(property.Value); - continue; - } - if (property.NameEquals("stepType"u8)) - { - stepType = property.Value.GetString().ToStepType(); - continue; - } - } - return new HealthCheckStepProperties(stepType, attributes); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/HealthCheckStepProperties.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/HealthCheckStepProperties.cs deleted file mode 100644 index 26c5d96e5bef9..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/HealthCheckStepProperties.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// Defines the properties of a health check step. - public partial class HealthCheckStepProperties : StepProperties - { - /// Initializes a new instance of HealthCheckStepProperties. - /// - /// The health check step attributes - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - /// is null. - public HealthCheckStepProperties(HealthCheckStepAttributes attributes) - { - Argument.AssertNotNull(attributes, nameof(attributes)); - - Attributes = attributes; - StepType = StepType.HealthCheck; - } - - /// Initializes a new instance of HealthCheckStepProperties. - /// The type of step. - /// - /// The health check step attributes - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - internal HealthCheckStepProperties(StepType stepType, HealthCheckStepAttributes attributes) : base(stepType) - { - Attributes = attributes; - StepType = stepType; - } - - /// - /// The health check step attributes - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - public HealthCheckStepAttributes Attributes { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Identity.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Identity.Serialization.cs deleted file mode 100644 index 16589f4a028ca..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Identity.Serialization.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class Identity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(IdentityType); - writer.WritePropertyName("identityIds"u8); - writer.WriteStartArray(); - foreach (var item in IdentityIds) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - } - - internal static Identity DeserializeIdentity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - IList identityIds = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("identityIds"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - identityIds = array; - continue; - } - } - return new Identity(type, identityIds); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Identity.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Identity.cs deleted file mode 100644 index a65251db7ed4d..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Identity.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// Identity for the resource. - public partial class Identity - { - /// Initializes a new instance of Identity. - /// The identity type. - /// The list of identities. - /// or is null. - public Identity(string identityType, IEnumerable identityIds) - { - Argument.AssertNotNull(identityType, nameof(identityType)); - Argument.AssertNotNull(identityIds, nameof(identityIds)); - - IdentityType = identityType; - IdentityIds = identityIds.ToList(); - } - - /// Initializes a new instance of Identity. - /// The identity type. - /// The list of identities. - internal Identity(string identityType, IList identityIds) - { - IdentityType = identityType; - IdentityIds = identityIds; - } - - /// The identity type. - public string IdentityType { get; set; } - /// The list of identities. - public IList IdentityIds { get; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Message.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Message.Serialization.cs deleted file mode 100644 index 7cbea416bc3db..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Message.Serialization.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class Message - { - internal static Message DeserializeMessage(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional timeStamp = default; - Optional message = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("timeStamp"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - timeStamp = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("message"u8)) - { - message = property.Value.GetString(); - continue; - } - } - return new Message(Optional.ToNullable(timeStamp), message.Value); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Message.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Message.cs deleted file mode 100644 index 8eb49eadad045..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Message.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// Supplementary contextual messages during a rollout. - public partial class Message - { - /// Initializes a new instance of Message. - internal Message() - { - } - - /// Initializes a new instance of Message. - /// Time in UTC this message was provided. - /// The actual message text. - internal Message(DateTimeOffset? timeStamp, string messageValue) - { - TimeStamp = timeStamp; - MessageValue = messageValue; - } - - /// Time in UTC this message was provided. - public DateTimeOffset? TimeStamp { get; } - /// The actual message text. - public string MessageValue { get; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/PrePostStep.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/PrePostStep.Serialization.cs deleted file mode 100644 index a2c2bd578b9c3..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/PrePostStep.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class PrePostStep : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("stepId"u8); - writer.WriteStringValue(StepId); - writer.WriteEndObject(); - } - - internal static PrePostStep DeserializePrePostStep(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string stepId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("stepId"u8)) - { - stepId = property.Value.GetString(); - continue; - } - } - return new PrePostStep(stepId); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/PrePostStep.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/PrePostStep.cs deleted file mode 100644 index 986f2eebf8d6e..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/PrePostStep.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// The properties that define a step. - public partial class PrePostStep - { - /// Initializes a new instance of PrePostStep. - /// The resource Id of the step to be run. - /// is null. - public PrePostStep(string stepId) - { - Argument.AssertNotNull(stepId, nameof(stepId)); - - StepId = stepId; - } - - /// The resource Id of the step to be run. - public string StepId { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ResourceOperation.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ResourceOperation.Serialization.cs deleted file mode 100644 index 1f87d052e1ef2..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ResourceOperation.Serialization.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class ResourceOperation - { - internal static ResourceOperation DeserializeResourceOperation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional resourceName = default; - Optional operationId = default; - Optional resourceType = default; - Optional provisioningState = default; - Optional statusMessage = default; - Optional statusCode = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("resourceName"u8)) - { - resourceName = property.Value.GetString(); - continue; - } - if (property.NameEquals("operationId"u8)) - { - operationId = property.Value.GetString(); - continue; - } - if (property.NameEquals("resourceType"u8)) - { - resourceType = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - provisioningState = property.Value.GetString(); - continue; - } - if (property.NameEquals("statusMessage"u8)) - { - statusMessage = property.Value.GetString(); - continue; - } - if (property.NameEquals("statusCode"u8)) - { - statusCode = property.Value.GetString(); - continue; - } - } - return new ResourceOperation(resourceName.Value, operationId.Value, resourceType.Value, provisioningState.Value, statusMessage.Value, statusCode.Value); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ResourceOperation.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ResourceOperation.cs deleted file mode 100644 index c1319004044a2..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ResourceOperation.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// Individual resource operation information. - public partial class ResourceOperation - { - /// Initializes a new instance of ResourceOperation. - internal ResourceOperation() - { - } - - /// Initializes a new instance of ResourceOperation. - /// 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. - internal ResourceOperation(string resourceName, string operationId, string resourceType, string provisioningState, string statusMessage, string statusCode) - { - ResourceName = resourceName; - OperationId = operationId; - ResourceType = resourceType; - ProvisioningState = provisioningState; - StatusMessage = statusMessage; - StatusCode = statusCode; - } - - /// Name of the resource as specified in the artifacts. For ARM resources, this is the name of the resource specified in the template. - public string ResourceName { get; } - /// Unique identifier of the operation. For ARM resources, this is the operationId obtained from ARM service. - public string OperationId { get; } - /// Type of the resource as specified in the artifacts. For ARM resources, this is the type of the resource specified in the template. - public string ResourceType { get; } - /// State of the resource deployment. For ARM resources, this is the current provisioning state of the resource. - public string ProvisioningState { get; } - /// Descriptive information of the resource operation. - public string StatusMessage { get; } - /// Http status code of the operation. - public string StatusCode { get; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestAuthLocation.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestAuthLocation.Serialization.cs deleted file mode 100644 index 318757066b092..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestAuthLocation.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - internal static partial class RestAuthLocationExtensions - { - public static string ToSerialString(this RestAuthLocation value) => value switch - { - RestAuthLocation.Query => "Query", - RestAuthLocation.Header => "Header", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown RestAuthLocation value.") - }; - - public static RestAuthLocation ToRestAuthLocation(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Query")) return RestAuthLocation.Query; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Header")) return RestAuthLocation.Header; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown RestAuthLocation value."); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestAuthLocation.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestAuthLocation.cs deleted file mode 100644 index eb055e4f56e22..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestAuthLocation.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// The location of the authentication key/value pair in the request. - public enum RestAuthLocation - { - /// Query. - Query, - /// Header. - Header - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestAuthType.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestAuthType.Serialization.cs deleted file mode 100644 index 299ca082b94fd..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestAuthType.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - internal static partial class RestAuthTypeExtensions - { - public static string ToSerialString(this RestAuthType value) => value switch - { - RestAuthType.ApiKey => "ApiKey", - RestAuthType.RolloutIdentity => "RolloutIdentity", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown RestAuthType value.") - }; - - public static RestAuthType ToRestAuthType(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "ApiKey")) return RestAuthType.ApiKey; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "RolloutIdentity")) return RestAuthType.RolloutIdentity; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown RestAuthType value."); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestAuthType.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestAuthType.cs deleted file mode 100644 index 1ddcfbd65f822..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestAuthType.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// The authentication type. - internal enum RestAuthType - { - /// ApiKey. - ApiKey, - /// RolloutIdentity. - RolloutIdentity - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestHealthCheck.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestHealthCheck.Serialization.cs deleted file mode 100644 index 6d4b603c2a18e..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestHealthCheck.Serialization.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class RestHealthCheck : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("request"u8); - writer.WriteObjectValue(Request); - if (Optional.IsDefined(Response)) - { - writer.WritePropertyName("response"u8); - writer.WriteObjectValue(Response); - } - writer.WriteEndObject(); - } - - internal static RestHealthCheck DeserializeRestHealthCheck(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - RestRequest request = default; - Optional response = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("request"u8)) - { - request = RestRequest.DeserializeRestRequest(property.Value); - continue; - } - if (property.NameEquals("response"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - response = RestResponse.DeserializeRestResponse(property.Value); - continue; - } - } - return new RestHealthCheck(name, request, response.Value); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestHealthCheck.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestHealthCheck.cs deleted file mode 100644 index b5cb66c0a3577..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestHealthCheck.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// A REST based health check. - public partial class RestHealthCheck - { - /// Initializes a new instance of RestHealthCheck. - /// A unique name for this check. - /// The request to the health provider. - /// or is null. - public RestHealthCheck(string name, RestRequest request) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(request, nameof(request)); - - Name = name; - Request = request; - } - - /// Initializes a new instance of RestHealthCheck. - /// A unique name for this check. - /// The request to the health provider. - /// The expected response from the health provider. If no expected response is provided, the default is to expect the received response to have an HTTP status code of 200 OK. - internal RestHealthCheck(string name, RestRequest request, RestResponse response) - { - Name = name; - Request = request; - Response = response; - } - - /// A unique name for this check. - public string Name { get; set; } - /// The request to the health provider. - public RestRequest Request { get; set; } - /// The expected response from the health provider. If no expected response is provided, the default is to expect the received response to have an HTTP status code of 200 OK. - public RestResponse Response { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestHealthCheckStepAttributes.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestHealthCheckStepAttributes.Serialization.cs deleted file mode 100644 index 7442ed79ddaf7..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestHealthCheckStepAttributes.Serialization.cs +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class RestHealthCheckStepAttributes : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(HealthCheckStepAttributesType); - if (Optional.IsDefined(WaitDuration)) - { - writer.WritePropertyName("waitDuration"u8); - writer.WriteStringValue(WaitDuration.Value, "P"); - } - if (Optional.IsDefined(MaxElasticDuration)) - { - writer.WritePropertyName("maxElasticDuration"u8); - writer.WriteStringValue(MaxElasticDuration.Value, "P"); - } - writer.WritePropertyName("healthyStateDuration"u8); - writer.WriteStringValue(HealthyStateDuration, "P"); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(HealthChecks)) - { - writer.WritePropertyName("healthChecks"u8); - writer.WriteStartArray(); - foreach (var item in HealthChecks) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static RestHealthCheckStepAttributes DeserializeRestHealthCheckStepAttributes(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional waitDuration = default; - Optional maxElasticDuration = default; - TimeSpan healthyStateDuration = default; - Optional> healthChecks = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("waitDuration"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - waitDuration = property.Value.GetTimeSpan("P"); - continue; - } - if (property.NameEquals("maxElasticDuration"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxElasticDuration = property.Value.GetTimeSpan("P"); - continue; - } - if (property.NameEquals("healthyStateDuration"u8)) - { - healthyStateDuration = property.Value.GetTimeSpan("P"); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("healthChecks"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(RestHealthCheck.DeserializeRestHealthCheck(item)); - } - healthChecks = array; - continue; - } - } - continue; - } - } - return new RestHealthCheckStepAttributes(type, Optional.ToNullable(waitDuration), Optional.ToNullable(maxElasticDuration), healthyStateDuration, Optional.ToList(healthChecks)); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestHealthCheckStepAttributes.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestHealthCheckStepAttributes.cs deleted file mode 100644 index d91a0f5544020..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestHealthCheckStepAttributes.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// Defines the REST health check step properties. - public partial class RestHealthCheckStepAttributes : HealthCheckStepAttributes - { - /// Initializes a new instance of RestHealthCheckStepAttributes. - /// The duration in ISO 8601 format for which the resource is expected to be continuously healthy. If maxElasticDuration is specified, healthy state duration is enforced after the detection of first healthy signal. - public RestHealthCheckStepAttributes(TimeSpan healthyStateDuration) : base(healthyStateDuration) - { - HealthChecks = new ChangeTrackingList(); - HealthCheckStepAttributesType = "REST"; - } - - /// Initializes a new instance of RestHealthCheckStepAttributes. - /// The type of health check. - /// The duration in ISO 8601 format for which health check waits idly without any checks. - /// The duration in ISO 8601 format for which the health check waits for the resource to become healthy. Health check fails if it doesn't. Health check starts to enforce healthyStateDuration once resource becomes healthy. - /// The duration in ISO 8601 format for which the resource is expected to be continuously healthy. If maxElasticDuration is specified, healthy state duration is enforced after the detection of first healthy signal. - /// The list of checks that form the health check step. - internal RestHealthCheckStepAttributes(string healthCheckStepAttributesType, TimeSpan? waitDuration, TimeSpan? maxElasticDuration, TimeSpan healthyStateDuration, IList healthChecks) : base(healthCheckStepAttributesType, waitDuration, maxElasticDuration, healthyStateDuration) - { - HealthChecks = healthChecks; - HealthCheckStepAttributesType = healthCheckStepAttributesType ?? "REST"; - } - - /// The list of checks that form the health check step. - public IList HealthChecks { get; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestMatchQuantifier.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestMatchQuantifier.Serialization.cs deleted file mode 100644 index 041fb1825cf15..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestMatchQuantifier.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - internal static partial class RestMatchQuantifierExtensions - { - public static string ToSerialString(this RestMatchQuantifier value) => value switch - { - RestMatchQuantifier.All => "All", - RestMatchQuantifier.Any => "Any", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown RestMatchQuantifier value.") - }; - - public static RestMatchQuantifier ToRestMatchQuantifier(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "All")) return RestMatchQuantifier.All; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Any")) return RestMatchQuantifier.Any; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown RestMatchQuantifier value."); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestMatchQuantifier.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestMatchQuantifier.cs deleted file mode 100644 index 8d4896ddb0b93..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestMatchQuantifier.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// Indicates whether any or all of the expressions should match with the response content. - public enum RestMatchQuantifier - { - /// All. - All, - /// Any. - Any - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequest.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequest.Serialization.cs deleted file mode 100644 index 020c9434a6276..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequest.Serialization.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class RestRequest : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("method"u8); - writer.WriteStringValue(Method.ToSerialString()); - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); - writer.WritePropertyName("authentication"u8); - writer.WriteObjectValue(Authentication); - writer.WriteEndObject(); - } - - internal static RestRequest DeserializeRestRequest(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RestRequestMethod method = default; - Uri uri = default; - RestRequestAuthentication authentication = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("method"u8)) - { - method = property.Value.GetString().ToRestRequestMethod(); - continue; - } - if (property.NameEquals("uri"u8)) - { - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("authentication"u8)) - { - authentication = RestRequestAuthentication.DeserializeRestRequestAuthentication(property.Value); - continue; - } - } - return new RestRequest(method, uri, authentication); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequest.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequest.cs deleted file mode 100644 index 3d21021483b34..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequest.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// The properties that make up a REST request. - public partial class RestRequest - { - /// Initializes a new instance of RestRequest. - /// The HTTP method to use for the request. - /// The HTTP URI to use for the request. - /// - /// The authentication information required in the request to the health provider. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// or is null. - public RestRequest(RestRequestMethod method, Uri uri, RestRequestAuthentication authentication) - { - Argument.AssertNotNull(uri, nameof(uri)); - Argument.AssertNotNull(authentication, nameof(authentication)); - - Method = method; - Uri = uri; - Authentication = authentication; - } - - /// The HTTP method to use for the request. - public RestRequestMethod Method { get; set; } - /// The HTTP URI to use for the request. - public Uri Uri { get; set; } - /// - /// The authentication information required in the request to the health provider. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public RestRequestAuthentication Authentication { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequestAuthentication.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequestAuthentication.Serialization.cs deleted file mode 100644 index b716f13294634..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequestAuthentication.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class RestRequestAuthentication : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToSerialString()); - writer.WriteEndObject(); - } - - internal static RestRequestAuthentication DeserializeRestRequestAuthentication(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "ApiKey": return ApiKeyAuthentication.DeserializeApiKeyAuthentication(element); - case "RolloutIdentity": return RolloutIdentityAuthentication.DeserializeRolloutIdentityAuthentication(element); - } - } - return UnknownRestRequestAuthentication.DeserializeUnknownRestRequestAuthentication(element); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequestAuthentication.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequestAuthentication.cs deleted file mode 100644 index b7da1572536e5..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequestAuthentication.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// - /// The authentication information required in the REST health check request to the health provider. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public abstract partial class RestRequestAuthentication - { - /// Initializes a new instance of RestRequestAuthentication. - protected RestRequestAuthentication() - { - } - - /// Initializes a new instance of RestRequestAuthentication. - /// The authentication type. - internal RestRequestAuthentication(RestAuthType authType) - { - AuthType = authType; - } - - /// The authentication type. - internal RestAuthType AuthType { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequestMethod.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequestMethod.Serialization.cs deleted file mode 100644 index 02f7bf6563eff..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequestMethod.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - internal static partial class RestRequestMethodExtensions - { - public static string ToSerialString(this RestRequestMethod value) => value switch - { - RestRequestMethod.GET => "GET", - RestRequestMethod.Post => "POST", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown RestRequestMethod value.") - }; - - public static RestRequestMethod ToRestRequestMethod(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "GET")) return RestRequestMethod.GET; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "POST")) return RestRequestMethod.Post; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown RestRequestMethod value."); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequestMethod.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequestMethod.cs deleted file mode 100644 index 0b77e9ff7ed76..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestRequestMethod.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// The HTTP method to use for the request. - public enum RestRequestMethod - { - /// GET. - GET, - /// POST. - Post - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestResponse.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestResponse.Serialization.cs deleted file mode 100644 index 192e6cfdb745d..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestResponse.Serialization.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class RestResponse : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(SuccessStatusCodes)) - { - writer.WritePropertyName("successStatusCodes"u8); - writer.WriteStartArray(); - foreach (var item in SuccessStatusCodes) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Regex)) - { - writer.WritePropertyName("regex"u8); - writer.WriteObjectValue(Regex); - } - writer.WriteEndObject(); - } - - internal static RestResponse DeserializeRestResponse(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> successStatusCodes = default; - Optional regex = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("successStatusCodes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - successStatusCodes = array; - continue; - } - if (property.NameEquals("regex"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - regex = RestResponseRegex.DeserializeRestResponseRegex(property.Value); - continue; - } - } - return new RestResponse(Optional.ToList(successStatusCodes), regex.Value); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestResponse.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestResponse.cs deleted file mode 100644 index a277f6da1bc53..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestResponse.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// The properties that make up the expected REST response. - public partial class RestResponse - { - /// Initializes a new instance of RestResponse. - public RestResponse() - { - SuccessStatusCodes = new ChangeTrackingList(); - } - - /// Initializes a new instance of RestResponse. - /// The HTTP status codes expected in a successful health check response. The response is expected to match one of the given status codes. If no expected status codes are provided, default expected status code is 200 OK. - /// The regular expressions to match the response content with. - internal RestResponse(IList successStatusCodes, RestResponseRegex regex) - { - SuccessStatusCodes = successStatusCodes; - Regex = regex; - } - - /// The HTTP status codes expected in a successful health check response. The response is expected to match one of the given status codes. If no expected status codes are provided, default expected status code is 200 OK. - public IList SuccessStatusCodes { get; } - /// The regular expressions to match the response content with. - public RestResponseRegex Regex { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestResponseRegex.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestResponseRegex.Serialization.cs deleted file mode 100644 index c3eca4422ddac..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestResponseRegex.Serialization.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class RestResponseRegex : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Matches)) - { - writer.WritePropertyName("matches"u8); - writer.WriteStartArray(); - foreach (var item in Matches) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(MatchQuantifier)) - { - writer.WritePropertyName("matchQuantifier"u8); - writer.WriteStringValue(MatchQuantifier.Value.ToSerialString()); - } - writer.WriteEndObject(); - } - - internal static RestResponseRegex DeserializeRestResponseRegex(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> matches = default; - Optional matchQuantifier = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("matches"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - matches = array; - continue; - } - if (property.NameEquals("matchQuantifier"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - matchQuantifier = property.Value.GetString().ToRestMatchQuantifier(); - continue; - } - } - return new RestResponseRegex(Optional.ToList(matches), Optional.ToNullable(matchQuantifier)); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestResponseRegex.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestResponseRegex.cs deleted file mode 100644 index a5635e4fdb29d..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RestResponseRegex.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// The regular expressions to match the response content with. - public partial class RestResponseRegex - { - /// Initializes a new instance of RestResponseRegex. - public RestResponseRegex() - { - Matches = new ChangeTrackingList(); - } - - /// Initializes a new instance of RestResponseRegex. - /// The list of regular expressions. - /// Indicates whether any or all of the expressions should match with the response content. - internal RestResponseRegex(IList matches, RestMatchQuantifier? matchQuantifier) - { - Matches = matches; - MatchQuantifier = matchQuantifier; - } - - /// The list of regular expressions. - public IList Matches { get; } - /// Indicates whether any or all of the expressions should match with the response content. - public RestMatchQuantifier? MatchQuantifier { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutCreateOrUpdateContent.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutCreateOrUpdateContent.Serialization.cs deleted file mode 100644 index e79c20019b2b6..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutCreateOrUpdateContent.Serialization.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class RolloutCreateOrUpdateContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("identity"u8); - writer.WriteObjectValue(Identity); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("buildVersion"u8); - writer.WriteStringValue(BuildVersion); - if (Optional.IsDefined(ArtifactSourceId)) - { - writer.WritePropertyName("artifactSourceId"u8); - writer.WriteStringValue(ArtifactSourceId); - } - writer.WritePropertyName("targetServiceTopologyId"u8); - writer.WriteStringValue(TargetServiceTopologyId); - writer.WritePropertyName("stepGroups"u8); - writer.WriteStartArray(); - foreach (var item in StepGroups) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static RolloutCreateOrUpdateContent DeserializeRolloutCreateOrUpdateContent(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Identity identity = default; - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - string buildVersion = default; - Optional artifactSourceId = default; - string targetServiceTopologyId = default; - IList stepGroups = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("identity"u8)) - { - identity = Identity.DeserializeIdentity(property.Value); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("buildVersion"u8)) - { - buildVersion = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("artifactSourceId"u8)) - { - artifactSourceId = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("targetServiceTopologyId"u8)) - { - targetServiceTopologyId = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("stepGroups"u8)) - { - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(StepGroup.DeserializeStepGroup(item)); - } - stepGroups = array; - continue; - } - } - continue; - } - } - return new RolloutCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, buildVersion, artifactSourceId.Value, targetServiceTopologyId, stepGroups); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutCreateOrUpdateContent.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutCreateOrUpdateContent.cs deleted file mode 100644 index f3b1fdcb81d50..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutCreateOrUpdateContent.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// Defines the PUT rollout request body. - public partial class RolloutCreateOrUpdateContent : TrackedResourceData - { - /// Initializes a new instance of RolloutCreateOrUpdateContent. - /// The location. - /// 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. - /// , , or is null. - public RolloutCreateOrUpdateContent(AzureLocation location, Identity identity, string buildVersion, string targetServiceTopologyId, IEnumerable stepGroups) : base(location) - { - Argument.AssertNotNull(identity, nameof(identity)); - Argument.AssertNotNull(buildVersion, nameof(buildVersion)); - Argument.AssertNotNull(targetServiceTopologyId, nameof(targetServiceTopologyId)); - Argument.AssertNotNull(stepGroups, nameof(stepGroups)); - - Identity = identity; - BuildVersion = buildVersion; - TargetServiceTopologyId = targetServiceTopologyId; - StepGroups = stepGroups.ToList(); - } - - /// Initializes a new instance of RolloutCreateOrUpdateContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Identity for the resource. - /// The version of the build being deployed. - /// The reference to the artifact source resource Id where the payload is located. - /// 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. - internal RolloutCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, Identity identity, string buildVersion, string artifactSourceId, string targetServiceTopologyId, IList stepGroups) : base(id, name, resourceType, systemData, tags, location) - { - Identity = identity; - BuildVersion = buildVersion; - ArtifactSourceId = artifactSourceId; - TargetServiceTopologyId = targetServiceTopologyId; - StepGroups = stepGroups; - } - - /// Identity for the resource. - public Identity Identity { get; set; } - /// The version of the build being deployed. - public string BuildVersion { get; set; } - /// The reference to the artifact source resource Id where the payload is located. - public string ArtifactSourceId { get; set; } - /// The resource Id of the service topology from which service units are being referenced in step groups to be deployed. - public string TargetServiceTopologyId { get; set; } - /// The list of step groups that define the orchestration. - public IList StepGroups { get; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutData.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutData.Serialization.cs deleted file mode 100644 index 36106f98fcd7e..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutData.Serialization.cs +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DeploymentManager.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DeploymentManager -{ - public partial class RolloutData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - writer.WriteObjectValue(Identity); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(BuildVersion)) - { - writer.WritePropertyName("buildVersion"u8); - writer.WriteStringValue(BuildVersion); - } - if (Optional.IsDefined(ArtifactSourceId)) - { - writer.WritePropertyName("artifactSourceId"u8); - writer.WriteStringValue(ArtifactSourceId); - } - if (Optional.IsDefined(TargetServiceTopologyId)) - { - writer.WritePropertyName("targetServiceTopologyId"u8); - writer.WriteStringValue(TargetServiceTopologyId); - } - if (Optional.IsCollectionDefined(StepGroups)) - { - writer.WritePropertyName("stepGroups"u8); - writer.WriteStartArray(); - foreach (var item in StepGroups) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static RolloutData DeserializeRolloutData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional identity = default; - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - Optional buildVersion = default; - Optional artifactSourceId = default; - Optional targetServiceTopologyId = default; - Optional> stepGroups = default; - Optional status = default; - Optional totalRetryAttempts = default; - Optional operationInfo = default; - Optional> services = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - identity = Identity.DeserializeIdentity(property.Value); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("buildVersion"u8)) - { - buildVersion = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("artifactSourceId"u8)) - { - artifactSourceId = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("targetServiceTopologyId"u8)) - { - targetServiceTopologyId = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("stepGroups"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(StepGroup.DeserializeStepGroup(item)); - } - stepGroups = array; - continue; - } - if (property0.NameEquals("status"u8)) - { - status = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("totalRetryAttempts"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - totalRetryAttempts = property0.Value.GetInt32(); - continue; - } - if (property0.NameEquals("operationInfo"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - operationInfo = RolloutOperationInfo.DeserializeRolloutOperationInfo(property0.Value); - continue; - } - if (property0.NameEquals("services"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(Service.DeserializeService(item)); - } - services = array; - continue; - } - } - continue; - } - } - return new RolloutData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity.Value, buildVersion.Value, artifactSourceId.Value, targetServiceTopologyId.Value, Optional.ToList(stepGroups), status.Value, Optional.ToNullable(totalRetryAttempts), operationInfo.Value, Optional.ToList(services)); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutIdentityAuthentication.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutIdentityAuthentication.Serialization.cs deleted file mode 100644 index 07bfa8a76a1e8..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutIdentityAuthentication.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class RolloutIdentityAuthentication : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToSerialString()); - writer.WriteEndObject(); - } - - internal static RolloutIdentityAuthentication DeserializeRolloutIdentityAuthentication(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RestAuthType type = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToRestAuthType(); - continue; - } - } - return new RolloutIdentityAuthentication(type); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutIdentityAuthentication.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutIdentityAuthentication.cs deleted file mode 100644 index 029deaf80fc11..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutIdentityAuthentication.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// RolloutIdentity uses the user-assigned managed identity authentication context specified in the Identity property during rollout creation. - public partial class RolloutIdentityAuthentication : RestRequestAuthentication - { - /// Initializes a new instance of RolloutIdentityAuthentication. - public RolloutIdentityAuthentication() - { - AuthType = RestAuthType.RolloutIdentity; - } - - /// Initializes a new instance of RolloutIdentityAuthentication. - /// The authentication type. - internal RolloutIdentityAuthentication(RestAuthType authType) : base(authType) - { - AuthType = authType; - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutOperationInfo.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutOperationInfo.Serialization.cs deleted file mode 100644 index 5adb40f0b325c..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutOperationInfo.Serialization.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class RolloutOperationInfo - { - internal static RolloutOperationInfo DeserializeRolloutOperationInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional retryAttempt = default; - Optional skipSucceededOnRetry = default; - Optional startTime = default; - Optional endTime = default; - Optional error = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("retryAttempt"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - retryAttempt = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("skipSucceededOnRetry"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - skipSucceededOnRetry = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("startTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("endTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("error"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - error = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new RolloutOperationInfo(Optional.ToNullable(retryAttempt), Optional.ToNullable(skipSucceededOnRetry), Optional.ToNullable(startTime), Optional.ToNullable(endTime), error.Value); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutOperationInfo.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutOperationInfo.cs deleted file mode 100644 index 88206d4a482c2..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutOperationInfo.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// Detailed runtime information of the rollout. - public partial class RolloutOperationInfo - { - /// Initializes a new instance of RolloutOperationInfo. - internal RolloutOperationInfo() - { - } - - /// Initializes a new instance of RolloutOperationInfo. - /// 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. - internal RolloutOperationInfo(int? retryAttempt, bool? skipSucceededOnRetry, DateTimeOffset? startOn, DateTimeOffset? endOn, ResponseError error) - { - RetryAttempt = retryAttempt; - SkipSucceededOnRetry = skipSucceededOnRetry; - StartOn = startOn; - EndOn = endOn; - Error = error; - } - - /// 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. - public int? RetryAttempt { get; } - /// True, if all steps that succeeded on the previous run/attempt were chosen to be skipped in this retry attempt. False, otherwise. - public bool? SkipSucceededOnRetry { get; } - /// The start time of the rollout in UTC. - public DateTimeOffset? StartOn { get; } - /// The start time of the rollout in UTC. This property will not be set if the rollout has not completed yet. - public DateTimeOffset? EndOn { get; } - /// The detailed error information for any failure. - public ResponseError Error { get; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutStep.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutStep.Serialization.cs deleted file mode 100644 index 616ae61359239..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutStep.Serialization.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class RolloutStep - { - internal static RolloutStep DeserializeRolloutStep(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - Optional status = default; - Optional stepGroup = default; - Optional operationInfo = default; - Optional> resourceOperations = default; - Optional> messages = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("status"u8)) - { - status = property.Value.GetString(); - continue; - } - if (property.NameEquals("stepGroup"u8)) - { - stepGroup = property.Value.GetString(); - continue; - } - if (property.NameEquals("operationInfo"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - operationInfo = StepOperationInfo.DeserializeStepOperationInfo(property.Value); - continue; - } - if (property.NameEquals("resourceOperations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ResourceOperation.DeserializeResourceOperation(item)); - } - resourceOperations = array; - continue; - } - if (property.NameEquals("messages"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Message.DeserializeMessage(item)); - } - messages = array; - continue; - } - } - return new RolloutStep(name, status.Value, stepGroup.Value, operationInfo.Value, Optional.ToList(resourceOperations), Optional.ToList(messages)); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutStep.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutStep.cs deleted file mode 100644 index 6d8141432fa36..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/RolloutStep.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// Defines a specific step on a target service unit. - public partial class RolloutStep - { - /// Initializes a new instance of RolloutStep. - /// Name of the step. - /// is null. - internal RolloutStep(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - ResourceOperations = new ChangeTrackingList(); - Messages = new ChangeTrackingList(); - } - - /// Initializes a new instance of RolloutStep. - /// 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. - internal RolloutStep(string name, string status, string stepGroup, StepOperationInfo operationInfo, IReadOnlyList resourceOperations, IReadOnlyList messages) - { - Name = name; - Status = status; - StepGroup = stepGroup; - OperationInfo = operationInfo; - ResourceOperations = resourceOperations; - Messages = messages; - } - - /// Name of the step. - public string Name { get; } - /// Current state of the step. - public string Status { get; } - /// The step group the current step is part of. - public string StepGroup { get; } - /// Detailed information of specific action execution. - public StepOperationInfo OperationInfo { get; } - /// Set of resource operations that were performed, if any, on an Azure resource. - public IReadOnlyList ResourceOperations { get; } - /// Supplementary informative messages during rollout. - public IReadOnlyList Messages { get; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/SasAuthentication.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/SasAuthentication.Serialization.cs deleted file mode 100644 index c31cba152fe48..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/SasAuthentication.Serialization.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class SasAuthentication : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthenticationType); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(SasUri)) - { - writer.WritePropertyName("sasUri"u8); - writer.WriteStringValue(SasUri.AbsoluteUri); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static SasAuthentication DeserializeSasAuthentication(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional sasUri = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("sasUri"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sasUri = new Uri(property0.Value.GetString()); - continue; - } - } - continue; - } - } - return new SasAuthentication(type, sasUri.Value); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/SasAuthentication.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/SasAuthentication.cs deleted file mode 100644 index 82bb0783b3851..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/SasAuthentication.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// Defines the properties to access the artifacts using an Azure Storage SAS URI. - public partial class SasAuthentication : Authentication - { - /// Initializes a new instance of SasAuthentication. - public SasAuthentication() - { - AuthenticationType = "Sas"; - } - - /// Initializes a new instance of SasAuthentication. - /// The authentication type. - /// 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. - internal SasAuthentication(string authenticationType, Uri sasUri) : base(authenticationType) - { - SasUri = sasUri; - AuthenticationType = authenticationType ?? "Sas"; - } - - /// 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 Uri SasUri { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Service.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Service.Serialization.cs deleted file mode 100644 index f8817f4e09c9b..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Service.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class Service - { - internal static Service DeserializeService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional> serviceUnits = default; - string targetLocation = default; - string targetSubscriptionId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("serviceUnits"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ServiceUnit.DeserializeServiceUnit(item)); - } - serviceUnits = array; - continue; - } - if (property.NameEquals("targetLocation"u8)) - { - targetLocation = property.Value.GetString(); - continue; - } - if (property.NameEquals("targetSubscriptionId"u8)) - { - targetSubscriptionId = property.Value.GetString(); - continue; - } - } - return new Service(targetLocation, targetSubscriptionId, name.Value, Optional.ToList(serviceUnits)); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Service.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Service.cs deleted file mode 100644 index e2c153540a668..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/Service.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// Defines a service. - public partial class Service : ServiceProperties - { - /// Initializes a new instance of Service. - /// 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. - /// or is null. - internal Service(string targetLocation, string targetSubscriptionId) : base(targetLocation, targetSubscriptionId) - { - Argument.AssertNotNull(targetLocation, nameof(targetLocation)); - Argument.AssertNotNull(targetSubscriptionId, nameof(targetSubscriptionId)); - - ServiceUnits = new ChangeTrackingList(); - } - - /// Initializes a new instance of Service. - /// 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. - /// or is null. - internal Service(string targetLocation, string targetSubscriptionId, string name, IReadOnlyList serviceUnits) : base(targetLocation, targetSubscriptionId) - { - Argument.AssertNotNull(targetLocation, nameof(targetLocation)); - Argument.AssertNotNull(targetSubscriptionId, nameof(targetSubscriptionId)); - - Name = name; - ServiceUnits = serviceUnits; - } - - /// Name of the service. - public string Name { get; } - /// The detailed information about the units that make up the service. - public IReadOnlyList ServiceUnits { get; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceProperties.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceProperties.Serialization.cs deleted file mode 100644 index 01966ce2290cf..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceProperties.Serialization.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class ServiceProperties - { - internal static ServiceProperties DeserializeServiceProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string targetLocation = default; - string targetSubscriptionId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("targetLocation"u8)) - { - targetLocation = property.Value.GetString(); - continue; - } - if (property.NameEquals("targetSubscriptionId"u8)) - { - targetSubscriptionId = property.Value.GetString(); - continue; - } - } - return new ServiceProperties(targetLocation, targetSubscriptionId); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceProperties.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceProperties.cs deleted file mode 100644 index 8683959e9ac62..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceProperties.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// The properties of a service. - public partial class ServiceProperties - { - /// Initializes a new instance of ServiceProperties. - /// 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. - /// or is null. - internal ServiceProperties(string targetLocation, string targetSubscriptionId) - { - Argument.AssertNotNull(targetLocation, nameof(targetLocation)); - Argument.AssertNotNull(targetSubscriptionId, nameof(targetSubscriptionId)); - - TargetLocation = targetLocation; - TargetSubscriptionId = targetSubscriptionId; - } - - /// The Azure location to which the resources in the service belong to or should be deployed to. - public string TargetLocation { get; } - /// The subscription to which the resources in the service belong to or should be deployed to. - public string TargetSubscriptionId { get; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceResourceData.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceResourceData.Serialization.cs deleted file mode 100644 index c17b5a7544e6a..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceResourceData.Serialization.cs +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DeploymentManager -{ - public partial class ServiceResourceData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("targetLocation"u8); - writer.WriteStringValue(TargetLocation); - writer.WritePropertyName("targetSubscriptionId"u8); - writer.WriteStringValue(TargetSubscriptionId); - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static ServiceResourceData DeserializeServiceResourceData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - string targetLocation = default; - string targetSubscriptionId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("targetLocation"u8)) - { - targetLocation = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("targetSubscriptionId"u8)) - { - targetSubscriptionId = property0.Value.GetString(); - continue; - } - } - continue; - } - } - return new ServiceResourceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, targetLocation, targetSubscriptionId); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceTopologyResourceData.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceTopologyResourceData.Serialization.cs deleted file mode 100644 index 515388f24c007..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceTopologyResourceData.Serialization.cs +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DeploymentManager -{ - public partial class ServiceTopologyResourceData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ArtifactSourceId)) - { - writer.WritePropertyName("artifactSourceId"u8); - writer.WriteStringValue(ArtifactSourceId); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static ServiceTopologyResourceData DeserializeServiceTopologyResourceData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - Optional artifactSourceId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("artifactSourceId"u8)) - { - artifactSourceId = property0.Value.GetString(); - continue; - } - } - continue; - } - } - return new ServiceTopologyResourceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, artifactSourceId.Value); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnit.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnit.Serialization.cs deleted file mode 100644 index a8ff30c601fe1..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnit.Serialization.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class ServiceUnit - { - internal static ServiceUnit DeserializeServiceUnit(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional> steps = default; - string targetResourceGroup = default; - DeploymentMode deploymentMode = default; - Optional artifacts = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("steps"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RolloutStep.DeserializeRolloutStep(item)); - } - steps = array; - continue; - } - if (property.NameEquals("targetResourceGroup"u8)) - { - targetResourceGroup = property.Value.GetString(); - continue; - } - if (property.NameEquals("deploymentMode"u8)) - { - deploymentMode = property.Value.GetString().ToDeploymentMode(); - continue; - } - if (property.NameEquals("artifacts"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - artifacts = ServiceUnitArtifacts.DeserializeServiceUnitArtifacts(property.Value); - continue; - } - } - return new ServiceUnit(targetResourceGroup, deploymentMode, artifacts.Value, name.Value, Optional.ToList(steps)); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnit.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnit.cs deleted file mode 100644 index e0010c5998cdb..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnit.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// Defines a service unit. - public partial class ServiceUnit : ServiceUnitProperties - { - /// Initializes a new instance of ServiceUnit. - /// 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. - /// is null. - internal ServiceUnit(string targetResourceGroup, DeploymentMode deploymentMode) : base(targetResourceGroup, deploymentMode) - { - Argument.AssertNotNull(targetResourceGroup, nameof(targetResourceGroup)); - - Steps = new ChangeTrackingList(); - } - - /// Initializes a new instance of ServiceUnit. - /// 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. - /// The artifacts for the service unit. - /// Name of the service unit. - /// Detailed step information, if present. - internal ServiceUnit(string targetResourceGroup, DeploymentMode deploymentMode, ServiceUnitArtifacts artifacts, string name, IReadOnlyList steps) : base(targetResourceGroup, deploymentMode, artifacts) - { - Name = name; - Steps = steps; - } - - /// Name of the service unit. - public string Name { get; } - /// Detailed step information, if present. - public IReadOnlyList Steps { get; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitArtifacts.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitArtifacts.Serialization.cs deleted file mode 100644 index 5797137a461da..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitArtifacts.Serialization.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class ServiceUnitArtifacts : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(TemplateUri)) - { - writer.WritePropertyName("templateUri"u8); - writer.WriteStringValue(TemplateUri.AbsoluteUri); - } - if (Optional.IsDefined(ParametersUri)) - { - writer.WritePropertyName("parametersUri"u8); - writer.WriteStringValue(ParametersUri.AbsoluteUri); - } - if (Optional.IsDefined(TemplateArtifactSourceRelativePath)) - { - writer.WritePropertyName("templateArtifactSourceRelativePath"u8); - writer.WriteStringValue(TemplateArtifactSourceRelativePath); - } - if (Optional.IsDefined(ParametersArtifactSourceRelativePath)) - { - writer.WritePropertyName("parametersArtifactSourceRelativePath"u8); - writer.WriteStringValue(ParametersArtifactSourceRelativePath); - } - writer.WriteEndObject(); - } - - internal static ServiceUnitArtifacts DeserializeServiceUnitArtifacts(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional templateUri = default; - Optional parametersUri = default; - Optional templateArtifactSourceRelativePath = default; - Optional parametersArtifactSourceRelativePath = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("templateUri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - templateUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("parametersUri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parametersUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("templateArtifactSourceRelativePath"u8)) - { - templateArtifactSourceRelativePath = property.Value.GetString(); - continue; - } - if (property.NameEquals("parametersArtifactSourceRelativePath"u8)) - { - parametersArtifactSourceRelativePath = property.Value.GetString(); - continue; - } - } - return new ServiceUnitArtifacts(templateUri.Value, parametersUri.Value, templateArtifactSourceRelativePath.Value, parametersArtifactSourceRelativePath.Value); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitArtifacts.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitArtifacts.cs deleted file mode 100644 index 7cb778c41a66b..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitArtifacts.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// Defines the artifacts of a service unit. - public partial class ServiceUnitArtifacts - { - /// Initializes a new instance of ServiceUnitArtifacts. - public ServiceUnitArtifacts() - { - } - - /// Initializes a new instance of ServiceUnitArtifacts. - /// 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. - internal ServiceUnitArtifacts(Uri templateUri, Uri parametersUri, string templateArtifactSourceRelativePath, string parametersArtifactSourceRelativePath) - { - TemplateUri = templateUri; - ParametersUri = parametersUri; - TemplateArtifactSourceRelativePath = templateArtifactSourceRelativePath; - ParametersArtifactSourceRelativePath = parametersArtifactSourceRelativePath; - } - - /// The full URI of the ARM template file with the SAS token. - public Uri TemplateUri { get; set; } - /// The full URI of the ARM parameters file with the SAS token. - public Uri ParametersUri { get; set; } - /// The path to the ARM template file relative to the artifact source. - public string TemplateArtifactSourceRelativePath { get; set; } - /// The path to the ARM parameters file relative to the artifact source. - public string ParametersArtifactSourceRelativePath { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitProperties.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitProperties.Serialization.cs deleted file mode 100644 index 876b3e0d1e481..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitProperties.Serialization.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class ServiceUnitProperties - { - internal static ServiceUnitProperties DeserializeServiceUnitProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string targetResourceGroup = default; - DeploymentMode deploymentMode = default; - Optional artifacts = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("targetResourceGroup"u8)) - { - targetResourceGroup = property.Value.GetString(); - continue; - } - if (property.NameEquals("deploymentMode"u8)) - { - deploymentMode = property.Value.GetString().ToDeploymentMode(); - continue; - } - if (property.NameEquals("artifacts"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - artifacts = ServiceUnitArtifacts.DeserializeServiceUnitArtifacts(property.Value); - continue; - } - } - return new ServiceUnitProperties(targetResourceGroup, deploymentMode, artifacts.Value); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitProperties.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitProperties.cs deleted file mode 100644 index 2047fd01852ba..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitProperties.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// Defines the properties of a service unit. - public partial class ServiceUnitProperties - { - /// Initializes a new instance of ServiceUnitProperties. - /// 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. - /// is null. - internal ServiceUnitProperties(string targetResourceGroup, DeploymentMode deploymentMode) - { - Argument.AssertNotNull(targetResourceGroup, nameof(targetResourceGroup)); - - TargetResourceGroup = targetResourceGroup; - DeploymentMode = deploymentMode; - } - - /// Initializes a new instance of ServiceUnitProperties. - /// 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. - /// The artifacts for the service unit. - internal ServiceUnitProperties(string targetResourceGroup, DeploymentMode deploymentMode, ServiceUnitArtifacts artifacts) - { - TargetResourceGroup = targetResourceGroup; - DeploymentMode = deploymentMode; - Artifacts = artifacts; - } - - /// The Azure Resource Group to which the resources in the service unit belong to or should be deployed to. - public string TargetResourceGroup { get; } - /// Describes the type of ARM deployment to be performed on the resource. - public DeploymentMode DeploymentMode { get; } - /// The artifacts for the service unit. - public ServiceUnitArtifacts Artifacts { get; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitResourceData.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitResourceData.Serialization.cs deleted file mode 100644 index 6d2b9712c6e81..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/ServiceUnitResourceData.Serialization.cs +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DeploymentManager.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DeploymentManager -{ - public partial class ServiceUnitResourceData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("targetResourceGroup"u8); - writer.WriteStringValue(TargetResourceGroup); - writer.WritePropertyName("deploymentMode"u8); - writer.WriteStringValue(DeploymentMode.ToSerialString()); - if (Optional.IsDefined(Artifacts)) - { - writer.WritePropertyName("artifacts"u8); - writer.WriteObjectValue(Artifacts); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static ServiceUnitResourceData DeserializeServiceUnitResourceData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - string targetResourceGroup = default; - DeploymentMode deploymentMode = default; - Optional artifacts = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("targetResourceGroup"u8)) - { - targetResourceGroup = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("deploymentMode"u8)) - { - deploymentMode = property0.Value.GetString().ToDeploymentMode(); - continue; - } - if (property0.NameEquals("artifacts"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - artifacts = ServiceUnitArtifacts.DeserializeServiceUnitArtifacts(property0.Value); - continue; - } - } - continue; - } - } - return new ServiceUnitResourceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, targetResourceGroup, deploymentMode, artifacts.Value); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepGroup.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepGroup.Serialization.cs deleted file mode 100644 index b7bd7d55565c1..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepGroup.Serialization.cs +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class StepGroup : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - if (Optional.IsCollectionDefined(DependsOnStepGroups)) - { - writer.WritePropertyName("dependsOnStepGroups"u8); - writer.WriteStartArray(); - foreach (var item in DependsOnStepGroups) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(PreDeploymentSteps)) - { - writer.WritePropertyName("preDeploymentSteps"u8); - writer.WriteStartArray(); - foreach (var item in PreDeploymentSteps) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("deploymentTargetId"u8); - writer.WriteStringValue(DeploymentTargetId); - if (Optional.IsCollectionDefined(PostDeploymentSteps)) - { - writer.WritePropertyName("postDeploymentSteps"u8); - writer.WriteStartArray(); - foreach (var item in PostDeploymentSteps) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static StepGroup DeserializeStepGroup(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - Optional> dependsOnStepGroups = default; - Optional> preDeploymentSteps = default; - string deploymentTargetId = default; - Optional> postDeploymentSteps = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("dependsOnStepGroups"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - dependsOnStepGroups = array; - continue; - } - if (property.NameEquals("preDeploymentSteps"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PrePostStep.DeserializePrePostStep(item)); - } - preDeploymentSteps = array; - continue; - } - if (property.NameEquals("deploymentTargetId"u8)) - { - deploymentTargetId = property.Value.GetString(); - continue; - } - if (property.NameEquals("postDeploymentSteps"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PrePostStep.DeserializePrePostStep(item)); - } - postDeploymentSteps = array; - continue; - } - } - return new StepGroup(name, Optional.ToList(dependsOnStepGroups), Optional.ToList(preDeploymentSteps), deploymentTargetId, Optional.ToList(postDeploymentSteps)); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepGroup.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepGroup.cs deleted file mode 100644 index 70a6c5612259a..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepGroup.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// The properties that define a Step group in a rollout. - public partial class StepGroup - { - /// Initializes a new instance of StepGroup. - /// 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. - /// or is null. - public StepGroup(string name, string deploymentTargetId) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(deploymentTargetId, nameof(deploymentTargetId)); - - Name = name; - DependsOnStepGroups = new ChangeTrackingList(); - PreDeploymentSteps = new ChangeTrackingList(); - DeploymentTargetId = deploymentTargetId; - PostDeploymentSteps = new ChangeTrackingList(); - } - - /// Initializes a new instance of StepGroup. - /// The name of the step group. - /// 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 resource Id of service unit to be deployed. The service unit should be from the service topology referenced in targetServiceTopologyId. - /// The list of steps to be run after deploying the target. - internal StepGroup(string name, IList dependsOnStepGroups, IList preDeploymentSteps, string deploymentTargetId, IList postDeploymentSteps) - { - Name = name; - DependsOnStepGroups = dependsOnStepGroups; - PreDeploymentSteps = preDeploymentSteps; - DeploymentTargetId = deploymentTargetId; - PostDeploymentSteps = postDeploymentSteps; - } - - /// The name of the step group. - public string Name { get; set; } - /// The list of step group names on which this step group depends on. - public IList DependsOnStepGroups { get; } - /// The list of steps to be run before deploying the target. - public IList PreDeploymentSteps { get; } - /// The resource Id of service unit to be deployed. The service unit should be from the service topology referenced in targetServiceTopologyId. - public string DeploymentTargetId { get; set; } - /// The list of steps to be run after deploying the target. - public IList PostDeploymentSteps { get; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepOperationInfo.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepOperationInfo.Serialization.cs deleted file mode 100644 index 38265f135a856..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepOperationInfo.Serialization.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class StepOperationInfo - { - internal static StepOperationInfo DeserializeStepOperationInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional deploymentName = default; - Optional correlationId = default; - Optional startTime = default; - Optional endTime = default; - Optional lastUpdatedTime = default; - Optional error = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("deploymentName"u8)) - { - deploymentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("correlationId"u8)) - { - correlationId = property.Value.GetString(); - continue; - } - if (property.NameEquals("startTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("endTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("lastUpdatedTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - lastUpdatedTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("error"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - error = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new StepOperationInfo(deploymentName.Value, correlationId.Value, Optional.ToNullable(startTime), Optional.ToNullable(endTime), Optional.ToNullable(lastUpdatedTime), error.Value); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepOperationInfo.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepOperationInfo.cs deleted file mode 100644 index c0e9367b129ee..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepOperationInfo.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// Detailed information of a specific step run. - public partial class StepOperationInfo - { - /// Initializes a new instance of StepOperationInfo. - internal StepOperationInfo() - { - } - - /// Initializes a new instance of StepOperationInfo. - /// 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. - internal StepOperationInfo(string deploymentName, string correlationId, DateTimeOffset? startOn, DateTimeOffset? endOn, DateTimeOffset? lastUpdatedOn, ResponseError error) - { - DeploymentName = deploymentName; - CorrelationId = correlationId; - StartOn = startOn; - EndOn = endOn; - LastUpdatedOn = lastUpdatedOn; - Error = error; - } - - /// The name of the ARM deployment initiated as part of the step. - public string DeploymentName { get; } - /// Unique identifier to track the request for ARM-based resources. - public string CorrelationId { get; } - /// Start time of the action in UTC. - public DateTimeOffset? StartOn { get; } - /// End time of the action in UTC. - public DateTimeOffset? EndOn { get; } - /// Last time in UTC this operation was updated. - public DateTimeOffset? LastUpdatedOn { get; } - /// The errors, if any, for the action. - public ResponseError Error { get; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepProperties.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepProperties.Serialization.cs deleted file mode 100644 index 07caa05e2453f..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepProperties.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class StepProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("stepType"u8); - writer.WriteStringValue(StepType.ToSerialString()); - writer.WriteEndObject(); - } - - internal static StepProperties DeserializeStepProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("stepType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "HealthCheck": return HealthCheckStepProperties.DeserializeHealthCheckStepProperties(element); - case "Wait": return WaitStepProperties.DeserializeWaitStepProperties(element); - } - } - return UnknownStepProperties.DeserializeUnknownStepProperties(element); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepProperties.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepProperties.cs deleted file mode 100644 index 632e3a289d050..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepProperties.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// - /// The properties of a step resource. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public abstract partial class StepProperties - { - /// Initializes a new instance of StepProperties. - protected StepProperties() - { - } - - /// Initializes a new instance of StepProperties. - /// The type of step. - internal StepProperties(StepType stepType) - { - StepType = stepType; - } - - /// The type of step. - internal StepType StepType { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepResourceData.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepResourceData.Serialization.cs deleted file mode 100644 index 760ef1e6fdaca..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepResourceData.Serialization.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DeploymentManager.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DeploymentManager -{ - public partial class StepResourceData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - writer.WriteEndObject(); - } - - internal static StepResourceData DeserializeStepResourceData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - StepProperties properties = default; - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = StepProperties.DeserializeStepProperties(property.Value); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new StepResourceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, properties); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepType.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepType.Serialization.cs deleted file mode 100644 index 55abfcf74f388..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepType.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - internal static partial class StepTypeExtensions - { - public static string ToSerialString(this StepType value) => value switch - { - StepType.Wait => "Wait", - StepType.HealthCheck => "HealthCheck", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown StepType value.") - }; - - public static StepType ToStepType(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Wait")) return StepType.Wait; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "HealthCheck")) return StepType.HealthCheck; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown StepType value."); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepType.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepType.cs deleted file mode 100644 index f05bab863a2f2..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/StepType.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// The type of step. - internal enum StepType - { - /// Wait. - Wait, - /// HealthCheck. - HealthCheck - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownAuthentication.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownAuthentication.Serialization.cs deleted file mode 100644 index da396c8eec05c..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownAuthentication.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - internal partial class UnknownAuthentication : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthenticationType); - writer.WriteEndObject(); - } - - internal static UnknownAuthentication DeserializeUnknownAuthentication(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - } - return new UnknownAuthentication(type); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownAuthentication.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownAuthentication.cs deleted file mode 100644 index db582a3777108..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownAuthentication.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// The UnknownAuthentication. - internal partial class UnknownAuthentication : Authentication - { - /// Initializes a new instance of UnknownAuthentication. - /// The authentication type. - internal UnknownAuthentication(string authenticationType) : base(authenticationType) - { - AuthenticationType = authenticationType ?? "Unknown"; - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownHealthCheckStepAttributes.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownHealthCheckStepAttributes.Serialization.cs deleted file mode 100644 index 1ddd33bd90ab8..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownHealthCheckStepAttributes.Serialization.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - internal partial class UnknownHealthCheckStepAttributes : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(HealthCheckStepAttributesType); - if (Optional.IsDefined(WaitDuration)) - { - writer.WritePropertyName("waitDuration"u8); - writer.WriteStringValue(WaitDuration.Value, "P"); - } - if (Optional.IsDefined(MaxElasticDuration)) - { - writer.WritePropertyName("maxElasticDuration"u8); - writer.WriteStringValue(MaxElasticDuration.Value, "P"); - } - writer.WritePropertyName("healthyStateDuration"u8); - writer.WriteStringValue(HealthyStateDuration, "P"); - writer.WriteEndObject(); - } - - internal static UnknownHealthCheckStepAttributes DeserializeUnknownHealthCheckStepAttributes(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - Optional waitDuration = default; - Optional maxElasticDuration = default; - TimeSpan healthyStateDuration = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("waitDuration"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - waitDuration = property.Value.GetTimeSpan("P"); - continue; - } - if (property.NameEquals("maxElasticDuration"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxElasticDuration = property.Value.GetTimeSpan("P"); - continue; - } - if (property.NameEquals("healthyStateDuration"u8)) - { - healthyStateDuration = property.Value.GetTimeSpan("P"); - continue; - } - } - return new UnknownHealthCheckStepAttributes(type, Optional.ToNullable(waitDuration), Optional.ToNullable(maxElasticDuration), healthyStateDuration); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownHealthCheckStepAttributes.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownHealthCheckStepAttributes.cs deleted file mode 100644 index 181820f37e1c7..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownHealthCheckStepAttributes.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// The UnknownHealthCheckStepAttributes. - internal partial class UnknownHealthCheckStepAttributes : HealthCheckStepAttributes - { - /// Initializes a new instance of UnknownHealthCheckStepAttributes. - /// The type of health check. - /// The duration in ISO 8601 format for which health check waits idly without any checks. - /// The duration in ISO 8601 format for which the health check waits for the resource to become healthy. Health check fails if it doesn't. Health check starts to enforce healthyStateDuration once resource becomes healthy. - /// The duration in ISO 8601 format for which the resource is expected to be continuously healthy. If maxElasticDuration is specified, healthy state duration is enforced after the detection of first healthy signal. - internal UnknownHealthCheckStepAttributes(string healthCheckStepAttributesType, TimeSpan? waitDuration, TimeSpan? maxElasticDuration, TimeSpan healthyStateDuration) : base(healthCheckStepAttributesType, waitDuration, maxElasticDuration, healthyStateDuration) - { - HealthCheckStepAttributesType = healthCheckStepAttributesType ?? "Unknown"; - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownRestRequestAuthentication.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownRestRequestAuthentication.Serialization.cs deleted file mode 100644 index 8e709bff8d5d4..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownRestRequestAuthentication.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - internal partial class UnknownRestRequestAuthentication : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToSerialString()); - writer.WriteEndObject(); - } - - internal static UnknownRestRequestAuthentication DeserializeUnknownRestRequestAuthentication(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RestAuthType type = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToRestAuthType(); - continue; - } - } - return new UnknownRestRequestAuthentication(type); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownRestRequestAuthentication.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownRestRequestAuthentication.cs deleted file mode 100644 index 31c4f5777be51..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownRestRequestAuthentication.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// The UnknownRestRequestAuthentication. - internal partial class UnknownRestRequestAuthentication : RestRequestAuthentication - { - /// Initializes a new instance of UnknownRestRequestAuthentication. - /// The authentication type. - internal UnknownRestRequestAuthentication(RestAuthType authType) : base(authType) - { - AuthType = authType; - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownStepProperties.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownStepProperties.Serialization.cs deleted file mode 100644 index d9a5f34a90f53..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownStepProperties.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - internal partial class UnknownStepProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("stepType"u8); - writer.WriteStringValue(StepType.ToSerialString()); - writer.WriteEndObject(); - } - - internal static UnknownStepProperties DeserializeUnknownStepProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - StepType stepType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("stepType"u8)) - { - stepType = property.Value.GetString().ToStepType(); - continue; - } - } - return new UnknownStepProperties(stepType); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownStepProperties.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownStepProperties.cs deleted file mode 100644 index c48c5bbd673ce..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/UnknownStepProperties.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// The UnknownStepProperties. - internal partial class UnknownStepProperties : StepProperties - { - /// Initializes a new instance of UnknownStepProperties. - /// The type of step. - internal UnknownStepProperties(StepType stepType) : base(stepType) - { - StepType = stepType; - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/WaitStepAttributes.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/WaitStepAttributes.Serialization.cs deleted file mode 100644 index bb3087871bbc6..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/WaitStepAttributes.Serialization.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class WaitStepAttributes : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("duration"u8); - writer.WriteStringValue(Duration, "P"); - writer.WriteEndObject(); - } - - internal static WaitStepAttributes DeserializeWaitStepAttributes(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - TimeSpan duration = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("duration"u8)) - { - duration = property.Value.GetTimeSpan("P"); - continue; - } - } - return new WaitStepAttributes(duration); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/WaitStepAttributes.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/WaitStepAttributes.cs deleted file mode 100644 index 5b315ceed124f..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/WaitStepAttributes.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// The parameters for the wait step. - public partial class WaitStepAttributes - { - /// Initializes a new instance of WaitStepAttributes. - /// The duration in ISO 8601 format of how long the wait should be. - public WaitStepAttributes(TimeSpan duration) - { - Duration = duration; - } - - /// The duration in ISO 8601 format of how long the wait should be. - public TimeSpan Duration { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/WaitStepProperties.Serialization.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/WaitStepProperties.Serialization.cs deleted file mode 100644 index 1f80d857fe813..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/WaitStepProperties.Serialization.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - public partial class WaitStepProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("attributes"u8); - writer.WriteObjectValue(Attributes); - writer.WritePropertyName("stepType"u8); - writer.WriteStringValue(StepType.ToSerialString()); - writer.WriteEndObject(); - } - - internal static WaitStepProperties DeserializeWaitStepProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - WaitStepAttributes attributes = default; - StepType stepType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("attributes"u8)) - { - attributes = WaitStepAttributes.DeserializeWaitStepAttributes(property.Value); - continue; - } - if (property.NameEquals("stepType"u8)) - { - stepType = property.Value.GetString().ToStepType(); - continue; - } - } - return new WaitStepProperties(stepType, attributes); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/WaitStepProperties.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/WaitStepProperties.cs deleted file mode 100644 index 28df0a6772e8f..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/Models/WaitStepProperties.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.DeploymentManager.Models -{ - /// Defines the properties of a Wait step. - public partial class WaitStepProperties : StepProperties - { - /// Initializes a new instance of WaitStepProperties. - /// The Wait attributes. - /// is null. - public WaitStepProperties(WaitStepAttributes attributes) - { - Argument.AssertNotNull(attributes, nameof(attributes)); - - Attributes = attributes; - StepType = StepType.Wait; - } - - /// Initializes a new instance of WaitStepProperties. - /// The type of step. - /// The Wait attributes. - internal WaitStepProperties(StepType stepType, WaitStepAttributes attributes) : base(stepType) - { - Attributes = attributes; - StepType = stepType; - } - - /// The Wait attributes. - internal WaitStepAttributes Attributes { get; set; } - /// The duration in ISO 8601 format of how long the wait should be. - public TimeSpan? AttributesDuration - { - get => Attributes is null ? default(TimeSpan?) : Attributes.Duration; - set - { - Attributes = value.HasValue ? new WaitStepAttributes(value.Value) : null; - } - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ProviderConstants.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ProviderConstants.cs deleted file mode 100644 index cb36865595057..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ProviderConstants.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DeploymentManager -{ - internal static class ProviderConstants - { - public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/ArtifactSourcesRestOperations.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/ArtifactSourcesRestOperations.cs deleted file mode 100644 index 6487cb5a496af..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/ArtifactSourcesRestOperations.cs +++ /dev/null @@ -1,361 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DeploymentManager -{ - internal partial class ArtifactSourcesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ArtifactSourcesRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public ArtifactSourcesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-11-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string artifactSourceName, ArtifactSourceData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/artifactSources/", false); - uri.AppendPath(artifactSourceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Synchronously creates a new artifact source or updates an existing artifact source. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string artifactSourceName, ArtifactSourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(artifactSourceName, nameof(artifactSourceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, artifactSourceName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 201: - { - ArtifactSourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ArtifactSourceData.DeserializeArtifactSourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Synchronously creates a new artifact source or updates an existing artifact source. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string artifactSourceName, ArtifactSourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(artifactSourceName, nameof(artifactSourceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, artifactSourceName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 201: - { - ArtifactSourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ArtifactSourceData.DeserializeArtifactSourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string artifactSourceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/artifactSources/", false); - uri.AppendPath(artifactSourceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets an artifact source. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The name of the artifact source. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string artifactSourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(artifactSourceName, nameof(artifactSourceName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, artifactSourceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ArtifactSourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ArtifactSourceData.DeserializeArtifactSourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ArtifactSourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets an artifact source. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The name of the artifact source. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string artifactSourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(artifactSourceName, nameof(artifactSourceName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, artifactSourceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ArtifactSourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ArtifactSourceData.DeserializeArtifactSourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ArtifactSourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string artifactSourceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/artifactSources/", false); - uri.AppendPath(artifactSourceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes an artifact source. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The name of the artifact source. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string artifactSourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(artifactSourceName, nameof(artifactSourceName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, artifactSourceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes an artifact source. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The name of the artifact source. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string artifactSourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(artifactSourceName, nameof(artifactSourceName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, artifactSourceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/artifactSources", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists the artifact sources in a resource group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task>> ListAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - IReadOnlyList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(ArtifactSourceData.DeserializeArtifactSourceData(item)); - } - value = array; - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists the artifact sources in a resource group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response> List(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - IReadOnlyList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(ArtifactSourceData.DeserializeArtifactSourceData(item)); - } - value = array; - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/RolloutsRestOperations.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/RolloutsRestOperations.cs deleted file mode 100644 index 37a8e342a252f..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/RolloutsRestOperations.cs +++ /dev/null @@ -1,522 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.DeploymentManager.Models; - -namespace Azure.ResourceManager.DeploymentManager -{ - internal partial class RolloutsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of RolloutsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public RolloutsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-11-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string rolloutName, RolloutCreateOrUpdateContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/rollouts/", false); - uri.AppendPath(rolloutName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// This is an asynchronous operation and can be polled to completion using the location header returned by this operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string rolloutName, RolloutCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, rolloutName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// This is an asynchronous operation and can be polled to completion using the location header returned by this operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string rolloutName, RolloutCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, rolloutName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string rolloutName, int? retryAttempt) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/rollouts/", false); - uri.AppendPath(rolloutName, true); - uri.AppendQuery("api-version", _apiVersion, true); - if (retryAttempt != null) - { - uri.AppendQuery("retryAttempt", retryAttempt.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets detailed information of a rollout. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string rolloutName, int? retryAttempt = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, rolloutName, retryAttempt); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RolloutData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RolloutData.DeserializeRolloutData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((RolloutData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets detailed information of a rollout. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string rolloutName, int? retryAttempt = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, rolloutName, retryAttempt); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RolloutData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RolloutData.DeserializeRolloutData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((RolloutData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string rolloutName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/rollouts/", false); - uri.AppendPath(rolloutName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Only rollouts in terminal state can be deleted. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The rollout name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string rolloutName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, rolloutName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Only rollouts in terminal state can be deleted. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The rollout name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string rolloutName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, rolloutName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCancelRequest(string subscriptionId, string resourceGroupName, string rolloutName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/rollouts/", false); - uri.AppendPath(rolloutName, true); - uri.AppendPath("/cancel", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Only running rollouts can be canceled. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The rollout name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> CancelAsync(string subscriptionId, string resourceGroupName, string rolloutName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); - - using var message = CreateCancelRequest(subscriptionId, resourceGroupName, rolloutName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RolloutData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RolloutData.DeserializeRolloutData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Only running rollouts can be canceled. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The rollout name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Cancel(string subscriptionId, string resourceGroupName, string rolloutName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); - - using var message = CreateCancelRequest(subscriptionId, resourceGroupName, rolloutName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RolloutData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RolloutData.DeserializeRolloutData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateRestartRequest(string subscriptionId, string resourceGroupName, string rolloutName, bool? skipSucceeded) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/rollouts/", false); - uri.AppendPath(rolloutName, true); - uri.AppendPath("/restart", false); - if (skipSucceeded != null) - { - uri.AppendQuery("skipSucceeded", skipSucceeded.Value, true); - } - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Only failed rollouts can be restarted. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> RestartAsync(string subscriptionId, string resourceGroupName, string rolloutName, bool? skipSucceeded = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); - - using var message = CreateRestartRequest(subscriptionId, resourceGroupName, rolloutName, skipSucceeded); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RolloutData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RolloutData.DeserializeRolloutData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Only failed rollouts can be restarted. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Restart(string subscriptionId, string resourceGroupName, string rolloutName, bool? skipSucceeded = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); - - using var message = CreateRestartRequest(subscriptionId, resourceGroupName, rolloutName, skipSucceeded); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RolloutData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RolloutData.DeserializeRolloutData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/rollouts", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists the rollouts in a resource group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task>> ListAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - IReadOnlyList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(RolloutData.DeserializeRolloutData(item)); - } - value = array; - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists the rollouts in a resource group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response> List(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - IReadOnlyList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(RolloutData.DeserializeRolloutData(item)); - } - value = array; - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/ServiceTopologiesRestOperations.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/ServiceTopologiesRestOperations.cs deleted file mode 100644 index ab30e15dba71d..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/ServiceTopologiesRestOperations.cs +++ /dev/null @@ -1,361 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DeploymentManager -{ - internal partial class ServiceTopologiesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ServiceTopologiesRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public ServiceTopologiesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-11-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceTopologyName, ServiceTopologyResourceData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/serviceTopologies/", false); - uri.AppendPath(serviceTopologyName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Synchronously creates a new service topology or updates an existing service topology. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The name of the service topology . - /// Source topology object defines the resource. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceTopologyName, ServiceTopologyResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceTopologyName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 201: - { - ServiceTopologyResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ServiceTopologyResourceData.DeserializeServiceTopologyResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Synchronously creates a new service topology or updates an existing service topology. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The name of the service topology . - /// Source topology object defines the resource. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceTopologyName, ServiceTopologyResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceTopologyName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 201: - { - ServiceTopologyResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ServiceTopologyResourceData.DeserializeServiceTopologyResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceTopologyName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/serviceTopologies/", false); - uri.AppendPath(serviceTopologyName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the service topology. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The name of the service topology . - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceTopologyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceTopologyName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ServiceTopologyResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ServiceTopologyResourceData.DeserializeServiceTopologyResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ServiceTopologyResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the service topology. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The name of the service topology . - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serviceTopologyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceTopologyName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ServiceTopologyResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ServiceTopologyResourceData.DeserializeServiceTopologyResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ServiceTopologyResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceTopologyName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/serviceTopologies/", false); - uri.AppendPath(serviceTopologyName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes the service topology. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The name of the service topology . - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceTopologyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceTopologyName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes the service topology. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The name of the service topology . - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string serviceTopologyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceTopologyName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/serviceTopologies", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists the service topologies in the resource group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task>> ListAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - IReadOnlyList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(ServiceTopologyResourceData.DeserializeServiceTopologyResourceData(item)); - } - value = array; - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists the service topologies in the resource group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response> List(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - IReadOnlyList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(ServiceTopologyResourceData.DeserializeServiceTopologyResourceData(item)); - } - value = array; - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/ServiceUnitsRestOperations.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/ServiceUnitsRestOperations.cs deleted file mode 100644 index 203a45bdfa19f..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/ServiceUnitsRestOperations.cs +++ /dev/null @@ -1,399 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DeploymentManager -{ - internal partial class ServiceUnitsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ServiceUnitsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public ServiceUnitsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-11-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName, ServiceUnitResourceData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/serviceTopologies/", false); - uri.AppendPath(serviceTopologyName, true); - uri.AppendPath("/services/", false); - uri.AppendPath(serviceName, true); - uri.AppendPath("/serviceUnits/", false); - uri.AppendPath(serviceUnitName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// This is an asynchronous operation and can be polled to completion using the operation resource returned by this operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName, ServiceUnitResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - Argument.AssertNotNullOrEmpty(serviceUnitName, nameof(serviceUnitName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// This is an asynchronous operation and can be polled to completion using the operation resource returned by this operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName, ServiceUnitResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - Argument.AssertNotNullOrEmpty(serviceUnitName, nameof(serviceUnitName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/serviceTopologies/", false); - uri.AppendPath(serviceTopologyName, true); - uri.AppendPath("/services/", false); - uri.AppendPath(serviceName, true); - uri.AppendPath("/serviceUnits/", false); - uri.AppendPath(serviceUnitName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the service unit. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - Argument.AssertNotNullOrEmpty(serviceUnitName, nameof(serviceUnitName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceTopologyName, serviceName, serviceUnitName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ServiceUnitResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ServiceUnitResourceData.DeserializeServiceUnitResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ServiceUnitResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the service unit. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - Argument.AssertNotNullOrEmpty(serviceUnitName, nameof(serviceUnitName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceTopologyName, serviceName, serviceUnitName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ServiceUnitResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ServiceUnitResourceData.DeserializeServiceUnitResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ServiceUnitResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/serviceTopologies/", false); - uri.AppendPath(serviceTopologyName, true); - uri.AppendPath("/services/", false); - uri.AppendPath(serviceName, true); - uri.AppendPath("/serviceUnits/", false); - uri.AppendPath(serviceUnitName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes the service unit. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - Argument.AssertNotNullOrEmpty(serviceUnitName, nameof(serviceUnitName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceTopologyName, serviceName, serviceUnitName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes the service unit. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - Argument.AssertNotNullOrEmpty(serviceUnitName, nameof(serviceUnitName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceTopologyName, serviceName, serviceUnitName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/serviceTopologies/", false); - uri.AppendPath(serviceTopologyName, true); - uri.AppendPath("/services/", false); - uri.AppendPath(serviceName, true); - uri.AppendPath("/serviceUnits", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists the service units under a service in the service topology. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task>> ListAsync(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceTopologyName, serviceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - IReadOnlyList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(ServiceUnitResourceData.DeserializeServiceUnitResourceData(item)); - } - value = array; - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists the service units under a service in the service topology. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response> List(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceTopologyName, serviceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - IReadOnlyList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(ServiceUnitResourceData.DeserializeServiceUnitResourceData(item)); - } - value = array; - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/ServicesRestOperations.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/ServicesRestOperations.cs deleted file mode 100644 index 4b3e71b7bfd6b..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/ServicesRestOperations.cs +++ /dev/null @@ -1,385 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DeploymentManager -{ - internal partial class ServicesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ServicesRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public ServicesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-11-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, ServiceResourceData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/serviceTopologies/", false); - uri.AppendPath(serviceTopologyName, true); - uri.AppendPath("/services/", false); - uri.AppendPath(serviceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Synchronously creates a new service or updates an existing service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, ServiceResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceTopologyName, serviceName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 201: - { - ServiceResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ServiceResourceData.DeserializeServiceResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Synchronously creates a new service or updates an existing service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, ServiceResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceTopologyName, serviceName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 201: - { - ServiceResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ServiceResourceData.DeserializeServiceResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/serviceTopologies/", false); - uri.AppendPath(serviceTopologyName, true); - uri.AppendPath("/services/", false); - uri.AppendPath(serviceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceTopologyName, serviceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ServiceResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ServiceResourceData.DeserializeServiceResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ServiceResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceTopologyName, serviceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ServiceResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ServiceResourceData.DeserializeServiceResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ServiceResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/serviceTopologies/", false); - uri.AppendPath(serviceTopologyName, true); - uri.AppendPath("/services/", false); - uri.AppendPath(serviceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes the service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceTopologyName, serviceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes the service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// 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 to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceTopologyName, serviceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serviceTopologyName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/serviceTopologies/", false); - uri.AppendPath(serviceTopologyName, true); - uri.AppendPath("/services", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists the services in the service topology. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The name of the service topology . - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task>> ListAsync(string subscriptionId, string resourceGroupName, string serviceTopologyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceTopologyName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - IReadOnlyList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(ServiceResourceData.DeserializeServiceResourceData(item)); - } - value = array; - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists the services in the service topology. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The name of the service topology . - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response> List(string subscriptionId, string resourceGroupName, string serviceTopologyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceTopologyName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - IReadOnlyList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(ServiceResourceData.DeserializeServiceResourceData(item)); - } - value = array; - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/StepsRestOperations.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/StepsRestOperations.cs deleted file mode 100644 index 39ec49566b451..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RestOperations/StepsRestOperations.cs +++ /dev/null @@ -1,361 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DeploymentManager -{ - internal partial class StepsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of StepsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public StepsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-11-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string stepName, StepResourceData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/steps/", false); - uri.AppendPath(stepName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Synchronously creates a new step or updates an existing step. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The name of the deployment step. - /// The step object. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string stepName, StepResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(stepName, nameof(stepName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, stepName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 201: - { - StepResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StepResourceData.DeserializeStepResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Synchronously creates a new step or updates an existing step. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The name of the deployment step. - /// The step object. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string stepName, StepResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(stepName, nameof(stepName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, stepName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 201: - { - StepResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StepResourceData.DeserializeStepResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string stepName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/steps/", false); - uri.AppendPath(stepName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the step. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The name of the deployment step. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string stepName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(stepName, nameof(stepName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, stepName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - StepResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StepResourceData.DeserializeStepResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((StepResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the step. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The name of the deployment step. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string stepName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(stepName, nameof(stepName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, stepName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - StepResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StepResourceData.DeserializeStepResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((StepResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string stepName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/steps/", false); - uri.AppendPath(stepName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes the step. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The name of the deployment step. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string stepName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(stepName, nameof(stepName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, stepName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes the step. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The name of the deployment step. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string stepName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(stepName, nameof(stepName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, stepName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DeploymentManager/steps", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists the steps in a resource group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task>> ListAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - IReadOnlyList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(StepResourceData.DeserializeStepResourceData(item)); - } - value = array; - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists the steps in a resource group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response> List(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - IReadOnlyList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(StepResourceData.DeserializeStepResourceData(item)); - } - value = array; - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RolloutCollection.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RolloutCollection.cs deleted file mode 100644 index 58c82a7e22544..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RolloutCollection.cs +++ /dev/null @@ -1,421 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.DeploymentManager.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetRollouts method from an instance of . - /// - public partial class RolloutCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _rolloutClientDiagnostics; - private readonly RolloutsRestOperations _rolloutRestClient; - - /// Initializes a new instance of the class for mocking. - protected RolloutCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal RolloutCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _rolloutClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DeploymentManager", RolloutResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(RolloutResource.ResourceType, out string rolloutApiVersion); - _rolloutRestClient = new RolloutsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, rolloutApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); - } - - /// - /// This is an asynchronous operation and can be polled to completion using the location header returned by this operation. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The rollout name. - /// Source rollout request object that defines the rollout. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string rolloutName, RolloutCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _rolloutRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, rolloutName, content, cancellationToken).ConfigureAwait(false); - var operation = new DeploymentManagerArmOperation(new RolloutOperationSource(Client), _rolloutClientDiagnostics, Pipeline, _rolloutRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, rolloutName, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// This is an asynchronous operation and can be polled to completion using the location header returned by this operation. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The rollout name. - /// Source rollout request object that defines the rollout. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string rolloutName, RolloutCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _rolloutRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, rolloutName, content, cancellationToken); - var operation = new DeploymentManagerArmOperation(new RolloutOperationSource(Client), _rolloutClientDiagnostics, Pipeline, _rolloutRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, rolloutName, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets detailed information of a rollout. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_Get - /// - /// - /// - /// 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 to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string rolloutName, int? retryAttempt = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); - - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutCollection.Get"); - scope.Start(); - try - { - var response = await _rolloutRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, rolloutName, retryAttempt, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RolloutResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets detailed information of a rollout. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_Get - /// - /// - /// - /// 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 to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string rolloutName, int? retryAttempt = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); - - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutCollection.Get"); - scope.Start(); - try - { - var response = _rolloutRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, rolloutName, retryAttempt, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RolloutResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists the rollouts in a resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts - /// - /// - /// Operation Id - /// Rollouts_List - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _rolloutRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new RolloutResource(Client, RolloutData.DeserializeRolloutData(e)), _rolloutClientDiagnostics, Pipeline, "RolloutCollection.GetAll", "", null, cancellationToken); - } - - /// - /// Lists the rollouts in a resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts - /// - /// - /// Operation Id - /// Rollouts_List - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _rolloutRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new RolloutResource(Client, RolloutData.DeserializeRolloutData(e)), _rolloutClientDiagnostics, Pipeline, "RolloutCollection.GetAll", "", null, cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_Get - /// - /// - /// - /// 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 to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string rolloutName, int? retryAttempt = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); - - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutCollection.Exists"); - scope.Start(); - try - { - var response = await _rolloutRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, rolloutName, retryAttempt, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_Get - /// - /// - /// - /// 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 to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string rolloutName, int? retryAttempt = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); - - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutCollection.Exists"); - scope.Start(); - try - { - var response = _rolloutRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, rolloutName, retryAttempt, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_Get - /// - /// - /// - /// 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 to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string rolloutName, int? retryAttempt = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); - - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _rolloutRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, rolloutName, retryAttempt, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new RolloutResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_Get - /// - /// - /// - /// 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 to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string rolloutName, int? retryAttempt = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); - - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutCollection.GetIfExists"); - scope.Start(); - try - { - var response = _rolloutRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, rolloutName, retryAttempt, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new RolloutResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RolloutData.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RolloutData.cs deleted file mode 100644 index 366419cc34cde..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RolloutData.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.DeploymentManager.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// - /// A class representing the Rollout data model. - /// Defines the rollout. - /// - public partial class RolloutData : TrackedResourceData - { - /// Initializes a new instance of RolloutData. - /// The location. - public RolloutData(AzureLocation location) : base(location) - { - StepGroups = new ChangeTrackingList(); - Services = new ChangeTrackingList(); - } - - /// Initializes a new instance of RolloutData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Identity for the resource. - /// The version of the build being deployed. - /// The reference to the artifact source resource Id where the payload is located. - /// 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. - /// 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. - internal RolloutData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, Identity identity, string buildVersion, string artifactSourceId, string targetServiceTopologyId, IList stepGroups, string status, int? totalRetryAttempts, RolloutOperationInfo operationInfo, IReadOnlyList services) : base(id, name, resourceType, systemData, tags, location) - { - Identity = identity; - BuildVersion = buildVersion; - ArtifactSourceId = artifactSourceId; - TargetServiceTopologyId = targetServiceTopologyId; - StepGroups = stepGroups; - Status = status; - TotalRetryAttempts = totalRetryAttempts; - OperationInfo = operationInfo; - Services = services; - } - - /// Identity for the resource. - public Identity Identity { get; set; } - /// The version of the build being deployed. - public string BuildVersion { get; set; } - /// The reference to the artifact source resource Id where the payload is located. - public string ArtifactSourceId { get; set; } - /// The resource Id of the service topology from which service units are being referenced in step groups to be deployed. - public string TargetServiceTopologyId { get; set; } - /// The list of step groups that define the orchestration. - public IList StepGroups { get; } - /// The current status of the rollout. - public string Status { get; } - /// The cardinal count of total number of retries performed on the rollout at a given time. - public int? TotalRetryAttempts { get; } - /// Operational information of the rollout. - public RolloutOperationInfo OperationInfo { get; } - /// The detailed information on the services being deployed. - public IReadOnlyList Services { get; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RolloutResource.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RolloutResource.cs deleted file mode 100644 index 1a7961e9af6a6..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/RolloutResource.cs +++ /dev/null @@ -1,734 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.DeploymentManager.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// - /// A Class representing a Rollout along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetRolloutResource method. - /// Otherwise you can get one from its parent resource using the GetRollout method. - /// - public partial class RolloutResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string rolloutName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _rolloutClientDiagnostics; - private readonly RolloutsRestOperations _rolloutRestClient; - private readonly RolloutData _data; - - /// Initializes a new instance of the class for mocking. - protected RolloutResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal RolloutResource(ArmClient client, RolloutData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal RolloutResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _rolloutClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DeploymentManager", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string rolloutApiVersion); - _rolloutRestClient = new RolloutsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, rolloutApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DeploymentManager/rollouts"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual RolloutData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets detailed information of a rollout. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_Get - /// - /// - /// - /// Rollout retry attempt ordinal to get the result of. If not specified, result of the latest attempt will be returned. - /// The cancellation token to use. - public virtual async Task> GetAsync(int? retryAttempt = null, CancellationToken cancellationToken = default) - { - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutResource.Get"); - scope.Start(); - try - { - var response = await _rolloutRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, retryAttempt, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RolloutResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets detailed information of a rollout. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_Get - /// - /// - /// - /// Rollout retry attempt ordinal to get the result of. If not specified, result of the latest attempt will be returned. - /// The cancellation token to use. - public virtual Response Get(int? retryAttempt = null, CancellationToken cancellationToken = default) - { - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutResource.Get"); - scope.Start(); - try - { - var response = _rolloutRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, retryAttempt, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RolloutResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Only rollouts in terminal state can be deleted. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutResource.Delete"); - scope.Start(); - try - { - var response = await _rolloutRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DeploymentManagerArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Only rollouts in terminal state can be deleted. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutResource.Delete"); - scope.Start(); - try - { - var response = _rolloutRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new DeploymentManagerArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// This is an asynchronous operation and can be polled to completion using the location header returned by this operation. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Source rollout request object that defines the rollout. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, RolloutCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutResource.Update"); - scope.Start(); - try - { - var response = await _rolloutRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new DeploymentManagerArmOperation(new RolloutOperationSource(Client), _rolloutClientDiagnostics, Pipeline, _rolloutRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// This is an asynchronous operation and can be polled to completion using the location header returned by this operation. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Source rollout request object that defines the rollout. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, RolloutCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutResource.Update"); - scope.Start(); - try - { - var response = _rolloutRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new DeploymentManagerArmOperation(new RolloutOperationSource(Client), _rolloutClientDiagnostics, Pipeline, _rolloutRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Only running rollouts can be canceled. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName}/cancel - /// - /// - /// Operation Id - /// Rollouts_Cancel - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> CancelAsync(CancellationToken cancellationToken = default) - { - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutResource.Cancel"); - scope.Start(); - try - { - var response = await _rolloutRestClient.CancelAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new RolloutResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Only running rollouts can be canceled. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName}/cancel - /// - /// - /// Operation Id - /// Rollouts_Cancel - /// - /// - /// - /// The cancellation token to use. - public virtual Response Cancel(CancellationToken cancellationToken = default) - { - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutResource.Cancel"); - scope.Start(); - try - { - var response = _rolloutRestClient.Cancel(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new RolloutResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Only failed rollouts can be restarted. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName}/restart - /// - /// - /// Operation Id - /// Rollouts_Restart - /// - /// - /// - /// 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 to use. - public virtual async Task> RestartAsync(bool? skipSucceeded = null, CancellationToken cancellationToken = default) - { - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutResource.Restart"); - scope.Start(); - try - { - var response = await _rolloutRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skipSucceeded, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new RolloutResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Only failed rollouts can be restarted. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName}/restart - /// - /// - /// Operation Id - /// Rollouts_Restart - /// - /// - /// - /// 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 to use. - public virtual Response Restart(bool? skipSucceeded = null, CancellationToken cancellationToken = default) - { - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutResource.Restart"); - scope.Start(); - try - { - var response = _rolloutRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skipSucceeded, cancellationToken); - return Response.FromValue(new RolloutResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _rolloutRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new RolloutResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new RolloutCreateOrUpdateContent(current.Location, current.Identity, current.BuildVersion, current.TargetServiceTopologyId, current.StepGroups); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _rolloutRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken); - return Response.FromValue(new RolloutResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new RolloutCreateOrUpdateContent(current.Location, current.Identity, current.BuildVersion, current.TargetServiceTopologyId, current.StepGroups); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _rolloutRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new RolloutResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new RolloutCreateOrUpdateContent(current.Location, current.Identity, current.BuildVersion, current.TargetServiceTopologyId, current.StepGroups); - patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _rolloutRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken); - return Response.FromValue(new RolloutResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new RolloutCreateOrUpdateContent(current.Location, current.Identity, current.BuildVersion, current.TargetServiceTopologyId, current.StepGroups); - patch.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _rolloutRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new RolloutResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new RolloutCreateOrUpdateContent(current.Location, current.Identity, current.BuildVersion, current.TargetServiceTopologyId, current.StepGroups); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName} - /// - /// - /// Operation Id - /// Rollouts_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _rolloutClientDiagnostics.CreateScope("RolloutResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _rolloutRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken); - return Response.FromValue(new RolloutResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new RolloutCreateOrUpdateContent(current.Location, current.Identity, current.BuildVersion, current.TargetServiceTopologyId, current.StepGroups); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceResource.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceResource.cs deleted file mode 100644 index a624708b66514..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceResource.cs +++ /dev/null @@ -1,639 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// - /// A Class representing a ServiceResource along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetServiceResource method. - /// Otherwise you can get one from its parent resource using the GetServiceResource method. - /// - public partial class ServiceResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _serviceResourceServicesClientDiagnostics; - private readonly ServicesRestOperations _serviceResourceServicesRestClient; - private readonly ServiceResourceData _data; - - /// Initializes a new instance of the class for mocking. - protected ServiceResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal ServiceResource(ArmClient client, ServiceResourceData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal ServiceResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _serviceResourceServicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DeploymentManager", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string serviceResourceServicesApiVersion); - _serviceResourceServicesRestClient = new ServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceResourceServicesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DeploymentManager/serviceTopologies/services"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual ServiceResourceData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// Gets a collection of ServiceUnitResources in the ServiceResource. - /// An object representing collection of ServiceUnitResources and their operations over a ServiceUnitResource. - public virtual ServiceUnitResourceCollection GetServiceUnitResources() - { - return GetCachedClient(Client => new ServiceUnitResourceCollection(Client, Id)); - } - - /// - /// Gets the service unit. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_Get - /// - /// - /// - /// The name of the service unit resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetServiceUnitResourceAsync(string serviceUnitName, CancellationToken cancellationToken = default) - { - return await GetServiceUnitResources().GetAsync(serviceUnitName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the service unit. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_Get - /// - /// - /// - /// The name of the service unit resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetServiceUnitResource(string serviceUnitName, CancellationToken cancellationToken = default) - { - return GetServiceUnitResources().Get(serviceUnitName, cancellationToken); - } - - /// - /// Gets the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_Get - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Get"); - scope.Start(); - try - { - var response = await _serviceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ServiceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_Get - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Get"); - scope.Start(); - try - { - var response = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ServiceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Delete"); - scope.Start(); - try - { - var response = await _serviceResourceServicesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DeploymentManagerArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Delete"); - scope.Start(); - try - { - var response = _serviceResourceServicesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DeploymentManagerArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Synchronously creates a new service or updates an existing service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The service object. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ServiceResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Update"); - scope.Start(); - try - { - var response = await _serviceResourceServicesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new DeploymentManagerArmOperation(Response.FromValue(new ServiceResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Synchronously creates a new service or updates an existing service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The service object. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ServiceResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Update"); - scope.Start(); - try - { - var response = _serviceResourceServicesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new DeploymentManagerArmOperation(Response.FromValue(new ServiceResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _serviceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new ServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags[key] = value; - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _serviceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new ServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _serviceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new ServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.Remove(key); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceResourceCollection.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceResourceCollection.cs deleted file mode 100644 index cb3ba682615be..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceResourceCollection.cs +++ /dev/null @@ -1,413 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetServiceResources method from an instance of . - /// - public partial class ServiceResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _serviceResourceServicesClientDiagnostics; - private readonly ServicesRestOperations _serviceResourceServicesRestClient; - - /// Initializes a new instance of the class for mocking. - protected ServiceResourceCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal ServiceResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _serviceResourceServicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DeploymentManager", ServiceResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ServiceResource.ResourceType, out string serviceResourceServicesApiVersion); - _serviceResourceServicesRestClient = new ServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceResourceServicesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ServiceTopologyResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceTopologyResource.ResourceType), nameof(id)); - } - - /// - /// Synchronously creates a new service or updates an existing service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the service resource. - /// The service object. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string serviceName, ServiceResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _serviceResourceServicesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serviceName, data, cancellationToken).ConfigureAwait(false); - var operation = new DeploymentManagerArmOperation(Response.FromValue(new ServiceResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Synchronously creates a new service or updates an existing service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the service resource. - /// The service object. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string serviceName, ServiceResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _serviceResourceServicesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serviceName, data, cancellationToken); - var operation = new DeploymentManagerArmOperation(Response.FromValue(new ServiceResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_Get - /// - /// - /// - /// The name of the service resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string serviceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.Get"); - scope.Start(); - try - { - var response = await _serviceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serviceName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ServiceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_Get - /// - /// - /// - /// The name of the service resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string serviceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.Get"); - scope.Start(); - try - { - var response = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serviceName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ServiceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists the services in the service topology. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services - /// - /// - /// Operation Id - /// Services_List - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceResourceServicesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new ServiceResource(Client, ServiceResourceData.DeserializeServiceResourceData(e)), _serviceResourceServicesClientDiagnostics, Pipeline, "ServiceResourceCollection.GetAll", "", null, cancellationToken); - } - - /// - /// Lists the services in the service topology. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services - /// - /// - /// Operation Id - /// Services_List - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceResourceServicesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new ServiceResource(Client, ServiceResourceData.DeserializeServiceResourceData(e)), _serviceResourceServicesClientDiagnostics, Pipeline, "ServiceResourceCollection.GetAll", "", null, cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_Get - /// - /// - /// - /// The name of the service resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string serviceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.Exists"); - scope.Start(); - try - { - var response = await _serviceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serviceName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_Get - /// - /// - /// - /// The name of the service resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string serviceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.Exists"); - scope.Start(); - try - { - var response = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serviceName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_Get - /// - /// - /// - /// The name of the service resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string serviceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _serviceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serviceName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new ServiceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_Get - /// - /// - /// - /// The name of the service resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string serviceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.GetIfExists"); - scope.Start(); - try - { - var response = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serviceName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new ServiceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceResourceData.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceResourceData.cs deleted file mode 100644 index f288a0f051552..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceResourceData.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// - /// A class representing the ServiceResource data model. - /// The resource representation of a service in a service topology. - /// - public partial class ServiceResourceData : TrackedResourceData - { - /// Initializes a new instance of ServiceResourceData. - /// The location. - /// 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. - /// or is null. - public ServiceResourceData(AzureLocation location, string targetLocation, string targetSubscriptionId) : base(location) - { - Argument.AssertNotNull(targetLocation, nameof(targetLocation)); - Argument.AssertNotNull(targetSubscriptionId, nameof(targetSubscriptionId)); - - TargetLocation = targetLocation; - TargetSubscriptionId = targetSubscriptionId; - } - - /// Initializes a new instance of ServiceResourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// 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. - internal ServiceResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string targetLocation, string targetSubscriptionId) : base(id, name, resourceType, systemData, tags, location) - { - TargetLocation = targetLocation; - TargetSubscriptionId = targetSubscriptionId; - } - - /// The Azure location to which the resources in the service belong to or should be deployed to. - public string TargetLocation { get; set; } - /// The subscription to which the resources in the service belong to or should be deployed to. - public string TargetSubscriptionId { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceTopologyResource.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceTopologyResource.cs deleted file mode 100644 index e50cd3b982fb5..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceTopologyResource.cs +++ /dev/null @@ -1,640 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// - /// A Class representing a ServiceTopologyResource along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetServiceTopologyResource method. - /// Otherwise you can get one from its parent resource using the GetServiceTopologyResource method. - /// - public partial class ServiceTopologyResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceTopologyName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _serviceTopologyResourceServiceTopologiesClientDiagnostics; - private readonly ServiceTopologiesRestOperations _serviceTopologyResourceServiceTopologiesRestClient; - private readonly ServiceTopologyResourceData _data; - - /// Initializes a new instance of the class for mocking. - protected ServiceTopologyResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal ServiceTopologyResource(ArmClient client, ServiceTopologyResourceData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal ServiceTopologyResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _serviceTopologyResourceServiceTopologiesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DeploymentManager", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string serviceTopologyResourceServiceTopologiesApiVersion); - _serviceTopologyResourceServiceTopologiesRestClient = new ServiceTopologiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceTopologyResourceServiceTopologiesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DeploymentManager/serviceTopologies"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual ServiceTopologyResourceData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// Gets a collection of ServiceResources in the ServiceTopologyResource. - /// An object representing collection of ServiceResources and their operations over a ServiceResource. - public virtual ServiceResourceCollection GetServiceResources() - { - return GetCachedClient(Client => new ServiceResourceCollection(Client, Id)); - } - - /// - /// Gets the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_Get - /// - /// - /// - /// The name of the service resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetServiceResourceAsync(string serviceName, CancellationToken cancellationToken = default) - { - return await GetServiceResources().GetAsync(serviceName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName} - /// - /// - /// Operation Id - /// Services_Get - /// - /// - /// - /// The name of the service resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetServiceResource(string serviceName, CancellationToken cancellationToken = default) - { - return GetServiceResources().Get(serviceName, cancellationToken); - } - - /// - /// Gets the service topology. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_Get - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResource.Get"); - scope.Start(); - try - { - var response = await _serviceTopologyResourceServiceTopologiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ServiceTopologyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the service topology. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_Get - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResource.Get"); - scope.Start(); - try - { - var response = _serviceTopologyResourceServiceTopologiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ServiceTopologyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the service topology. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResource.Delete"); - scope.Start(); - try - { - var response = await _serviceTopologyResourceServiceTopologiesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DeploymentManagerArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the service topology. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResource.Delete"); - scope.Start(); - try - { - var response = _serviceTopologyResourceServiceTopologiesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new DeploymentManagerArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Synchronously creates a new service topology or updates an existing service topology. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Source topology object defines the resource. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ServiceTopologyResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResource.Update"); - scope.Start(); - try - { - var response = await _serviceTopologyResourceServiceTopologiesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new DeploymentManagerArmOperation(Response.FromValue(new ServiceTopologyResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Synchronously creates a new service topology or updates an existing service topology. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Source topology object defines the resource. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ServiceTopologyResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResource.Update"); - scope.Start(); - try - { - var response = _serviceTopologyResourceServiceTopologiesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken); - var operation = new DeploymentManagerArmOperation(Response.FromValue(new ServiceTopologyResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _serviceTopologyResourceServiceTopologiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ServiceTopologyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _serviceTopologyResourceServiceTopologiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new ServiceTopologyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags[key] = value; - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _serviceTopologyResourceServiceTopologiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ServiceTopologyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _serviceTopologyResourceServiceTopologiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new ServiceTopologyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _serviceTopologyResourceServiceTopologiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ServiceTopologyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _serviceTopologyResourceServiceTopologiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new ServiceTopologyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.Remove(key); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceTopologyResourceCollection.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceTopologyResourceCollection.cs deleted file mode 100644 index 25286c1fad9e5..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceTopologyResourceCollection.cs +++ /dev/null @@ -1,414 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetServiceTopologyResources method from an instance of . - /// - public partial class ServiceTopologyResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _serviceTopologyResourceServiceTopologiesClientDiagnostics; - private readonly ServiceTopologiesRestOperations _serviceTopologyResourceServiceTopologiesRestClient; - - /// Initializes a new instance of the class for mocking. - protected ServiceTopologyResourceCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal ServiceTopologyResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _serviceTopologyResourceServiceTopologiesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DeploymentManager", ServiceTopologyResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ServiceTopologyResource.ResourceType, out string serviceTopologyResourceServiceTopologiesApiVersion); - _serviceTopologyResourceServiceTopologiesRestClient = new ServiceTopologiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceTopologyResourceServiceTopologiesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); - } - - /// - /// Synchronously creates a new service topology or updates an existing service topology. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the service topology . - /// Source topology object defines the resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string serviceTopologyName, ServiceTopologyResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _serviceTopologyResourceServiceTopologiesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, serviceTopologyName, data, cancellationToken).ConfigureAwait(false); - var operation = new DeploymentManagerArmOperation(Response.FromValue(new ServiceTopologyResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Synchronously creates a new service topology or updates an existing service topology. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the service topology . - /// Source topology object defines the resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string serviceTopologyName, ServiceTopologyResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _serviceTopologyResourceServiceTopologiesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, serviceTopologyName, data, cancellationToken); - var operation = new DeploymentManagerArmOperation(Response.FromValue(new ServiceTopologyResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the service topology. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_Get - /// - /// - /// - /// The name of the service topology . - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string serviceTopologyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResourceCollection.Get"); - scope.Start(); - try - { - var response = await _serviceTopologyResourceServiceTopologiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, serviceTopologyName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ServiceTopologyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the service topology. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_Get - /// - /// - /// - /// The name of the service topology . - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string serviceTopologyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResourceCollection.Get"); - scope.Start(); - try - { - var response = _serviceTopologyResourceServiceTopologiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, serviceTopologyName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ServiceTopologyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists the service topologies in the resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies - /// - /// - /// Operation Id - /// ServiceTopologies_List - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceTopologyResourceServiceTopologiesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new ServiceTopologyResource(Client, ServiceTopologyResourceData.DeserializeServiceTopologyResourceData(e)), _serviceTopologyResourceServiceTopologiesClientDiagnostics, Pipeline, "ServiceTopologyResourceCollection.GetAll", "", null, cancellationToken); - } - - /// - /// Lists the service topologies in the resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies - /// - /// - /// Operation Id - /// ServiceTopologies_List - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceTopologyResourceServiceTopologiesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new ServiceTopologyResource(Client, ServiceTopologyResourceData.DeserializeServiceTopologyResourceData(e)), _serviceTopologyResourceServiceTopologiesClientDiagnostics, Pipeline, "ServiceTopologyResourceCollection.GetAll", "", null, cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_Get - /// - /// - /// - /// The name of the service topology . - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string serviceTopologyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResourceCollection.Exists"); - scope.Start(); - try - { - var response = await _serviceTopologyResourceServiceTopologiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, serviceTopologyName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_Get - /// - /// - /// - /// The name of the service topology . - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string serviceTopologyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResourceCollection.Exists"); - scope.Start(); - try - { - var response = _serviceTopologyResourceServiceTopologiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, serviceTopologyName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_Get - /// - /// - /// - /// The name of the service topology . - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string serviceTopologyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResourceCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _serviceTopologyResourceServiceTopologiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, serviceTopologyName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new ServiceTopologyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName} - /// - /// - /// Operation Id - /// ServiceTopologies_Get - /// - /// - /// - /// The name of the service topology . - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string serviceTopologyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceTopologyName, nameof(serviceTopologyName)); - - using var scope = _serviceTopologyResourceServiceTopologiesClientDiagnostics.CreateScope("ServiceTopologyResourceCollection.GetIfExists"); - scope.Start(); - try - { - var response = _serviceTopologyResourceServiceTopologiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, serviceTopologyName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new ServiceTopologyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceTopologyResourceData.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceTopologyResourceData.cs deleted file mode 100644 index ee6db8288ebcf..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceTopologyResourceData.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// - /// A class representing the ServiceTopologyResource data model. - /// The resource representation of a service topology. - /// - public partial class ServiceTopologyResourceData : TrackedResourceData - { - /// Initializes a new instance of ServiceTopologyResourceData. - /// The location. - public ServiceTopologyResourceData(AzureLocation location) : base(location) - { - } - - /// Initializes a new instance of ServiceTopologyResourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The resource Id of the artifact source that contains the artifacts that can be referenced in the service units. - internal ServiceTopologyResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string artifactSourceId) : base(id, name, resourceType, systemData, tags, location) - { - ArtifactSourceId = artifactSourceId; - } - - /// The resource Id of the artifact source that contains the artifacts that can be referenced in the service units. - public string ArtifactSourceId { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceUnitResource.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceUnitResource.cs deleted file mode 100644 index 56fbc0f5ee6ec..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceUnitResource.cs +++ /dev/null @@ -1,586 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// - /// A Class representing a ServiceUnitResource along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetServiceUnitResource method. - /// Otherwise you can get one from its parent resource using the GetServiceUnitResource method. - /// - public partial class ServiceUnitResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _serviceUnitResourceServiceUnitsClientDiagnostics; - private readonly ServiceUnitsRestOperations _serviceUnitResourceServiceUnitsRestClient; - private readonly ServiceUnitResourceData _data; - - /// Initializes a new instance of the class for mocking. - protected ServiceUnitResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal ServiceUnitResource(ArmClient client, ServiceUnitResourceData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal ServiceUnitResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _serviceUnitResourceServiceUnitsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DeploymentManager", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string serviceUnitResourceServiceUnitsApiVersion); - _serviceUnitResourceServiceUnitsRestClient = new ServiceUnitsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceUnitResourceServiceUnitsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DeploymentManager/serviceTopologies/services/serviceUnits"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual ServiceUnitResourceData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets the service unit. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_Get - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResource.Get"); - scope.Start(); - try - { - var response = await _serviceUnitResourceServiceUnitsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ServiceUnitResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the service unit. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_Get - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResource.Get"); - scope.Start(); - try - { - var response = _serviceUnitResourceServiceUnitsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ServiceUnitResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the service unit. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResource.Delete"); - scope.Start(); - try - { - var response = await _serviceUnitResourceServiceUnitsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DeploymentManagerArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the service unit. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResource.Delete"); - scope.Start(); - try - { - var response = _serviceUnitResourceServiceUnitsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DeploymentManagerArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// This is an asynchronous operation and can be polled to completion using the operation resource returned by this operation. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The service unit resource object. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ServiceUnitResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResource.Update"); - scope.Start(); - try - { - var response = await _serviceUnitResourceServiceUnitsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new DeploymentManagerArmOperation(new ServiceUnitResourceOperationSource(Client), _serviceUnitResourceServiceUnitsClientDiagnostics, Pipeline, _serviceUnitResourceServiceUnitsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// This is an asynchronous operation and can be polled to completion using the operation resource returned by this operation. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The service unit resource object. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ServiceUnitResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResource.Update"); - scope.Start(); - try - { - var response = _serviceUnitResourceServiceUnitsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new DeploymentManagerArmOperation(new ServiceUnitResourceOperationSource(Client), _serviceUnitResourceServiceUnitsClientDiagnostics, Pipeline, _serviceUnitResourceServiceUnitsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _serviceUnitResourceServiceUnitsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ServiceUnitResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _serviceUnitResourceServiceUnitsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new ServiceUnitResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags[key] = value; - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _serviceUnitResourceServiceUnitsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ServiceUnitResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _serviceUnitResourceServiceUnitsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new ServiceUnitResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _serviceUnitResourceServiceUnitsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ServiceUnitResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _serviceUnitResourceServiceUnitsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new ServiceUnitResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.Remove(key); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceUnitResourceCollection.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceUnitResourceCollection.cs deleted file mode 100644 index e21945778c0e5..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceUnitResourceCollection.cs +++ /dev/null @@ -1,413 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetServiceUnitResources method from an instance of . - /// - public partial class ServiceUnitResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _serviceUnitResourceServiceUnitsClientDiagnostics; - private readonly ServiceUnitsRestOperations _serviceUnitResourceServiceUnitsRestClient; - - /// Initializes a new instance of the class for mocking. - protected ServiceUnitResourceCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal ServiceUnitResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _serviceUnitResourceServiceUnitsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DeploymentManager", ServiceUnitResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ServiceUnitResource.ResourceType, out string serviceUnitResourceServiceUnitsApiVersion); - _serviceUnitResourceServiceUnitsRestClient = new ServiceUnitsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceUnitResourceServiceUnitsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ServiceResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceResource.ResourceType), nameof(id)); - } - - /// - /// This is an asynchronous operation and can be polled to completion using the operation resource returned by this operation. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the service unit resource. - /// The service unit resource object. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string serviceUnitName, ServiceUnitResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceUnitName, nameof(serviceUnitName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _serviceUnitResourceServiceUnitsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, serviceUnitName, data, cancellationToken).ConfigureAwait(false); - var operation = new DeploymentManagerArmOperation(new ServiceUnitResourceOperationSource(Client), _serviceUnitResourceServiceUnitsClientDiagnostics, Pipeline, _serviceUnitResourceServiceUnitsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, serviceUnitName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// This is an asynchronous operation and can be polled to completion using the operation resource returned by this operation. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the service unit resource. - /// The service unit resource object. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string serviceUnitName, ServiceUnitResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceUnitName, nameof(serviceUnitName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _serviceUnitResourceServiceUnitsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, serviceUnitName, data, cancellationToken); - var operation = new DeploymentManagerArmOperation(new ServiceUnitResourceOperationSource(Client), _serviceUnitResourceServiceUnitsClientDiagnostics, Pipeline, _serviceUnitResourceServiceUnitsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, serviceUnitName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the service unit. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_Get - /// - /// - /// - /// The name of the service unit resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string serviceUnitName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceUnitName, nameof(serviceUnitName)); - - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResourceCollection.Get"); - scope.Start(); - try - { - var response = await _serviceUnitResourceServiceUnitsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, serviceUnitName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ServiceUnitResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the service unit. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_Get - /// - /// - /// - /// The name of the service unit resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string serviceUnitName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceUnitName, nameof(serviceUnitName)); - - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResourceCollection.Get"); - scope.Start(); - try - { - var response = _serviceUnitResourceServiceUnitsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, serviceUnitName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ServiceUnitResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists the service units under a service in the service topology. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits - /// - /// - /// Operation Id - /// ServiceUnits_List - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceUnitResourceServiceUnitsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new ServiceUnitResource(Client, ServiceUnitResourceData.DeserializeServiceUnitResourceData(e)), _serviceUnitResourceServiceUnitsClientDiagnostics, Pipeline, "ServiceUnitResourceCollection.GetAll", "", null, cancellationToken); - } - - /// - /// Lists the service units under a service in the service topology. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits - /// - /// - /// Operation Id - /// ServiceUnits_List - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceUnitResourceServiceUnitsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new ServiceUnitResource(Client, ServiceUnitResourceData.DeserializeServiceUnitResourceData(e)), _serviceUnitResourceServiceUnitsClientDiagnostics, Pipeline, "ServiceUnitResourceCollection.GetAll", "", null, cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_Get - /// - /// - /// - /// The name of the service unit resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string serviceUnitName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceUnitName, nameof(serviceUnitName)); - - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResourceCollection.Exists"); - scope.Start(); - try - { - var response = await _serviceUnitResourceServiceUnitsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, serviceUnitName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_Get - /// - /// - /// - /// The name of the service unit resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string serviceUnitName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceUnitName, nameof(serviceUnitName)); - - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResourceCollection.Exists"); - scope.Start(); - try - { - var response = _serviceUnitResourceServiceUnitsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, serviceUnitName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_Get - /// - /// - /// - /// The name of the service unit resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string serviceUnitName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceUnitName, nameof(serviceUnitName)); - - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResourceCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _serviceUnitResourceServiceUnitsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, serviceUnitName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new ServiceUnitResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName} - /// - /// - /// Operation Id - /// ServiceUnits_Get - /// - /// - /// - /// The name of the service unit resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string serviceUnitName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(serviceUnitName, nameof(serviceUnitName)); - - using var scope = _serviceUnitResourceServiceUnitsClientDiagnostics.CreateScope("ServiceUnitResourceCollection.GetIfExists"); - scope.Start(); - try - { - var response = _serviceUnitResourceServiceUnitsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, serviceUnitName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new ServiceUnitResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceUnitResourceData.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceUnitResourceData.cs deleted file mode 100644 index 3e19f7c3c7933..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/ServiceUnitResourceData.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.DeploymentManager.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// - /// A class representing the ServiceUnitResource data model. - /// Represents the response of a service unit resource. - /// - public partial class ServiceUnitResourceData : TrackedResourceData - { - /// Initializes a new instance of ServiceUnitResourceData. - /// The location. - /// 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. - /// is null. - public ServiceUnitResourceData(AzureLocation location, string targetResourceGroup, DeploymentMode deploymentMode) : base(location) - { - Argument.AssertNotNull(targetResourceGroup, nameof(targetResourceGroup)); - - TargetResourceGroup = targetResourceGroup; - DeploymentMode = deploymentMode; - } - - /// Initializes a new instance of ServiceUnitResourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// 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. - /// The artifacts for the service unit. - internal ServiceUnitResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string targetResourceGroup, DeploymentMode deploymentMode, ServiceUnitArtifacts artifacts) : base(id, name, resourceType, systemData, tags, location) - { - TargetResourceGroup = targetResourceGroup; - DeploymentMode = deploymentMode; - Artifacts = artifacts; - } - - /// The Azure Resource Group to which the resources in the service unit belong to or should be deployed to. - public string TargetResourceGroup { get; set; } - /// Describes the type of ARM deployment to be performed on the resource. - public DeploymentMode DeploymentMode { get; set; } - /// The artifacts for the service unit. - public ServiceUnitArtifacts Artifacts { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/StepResource.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/StepResource.cs deleted file mode 100644 index 2cd6aa6972037..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/StepResource.cs +++ /dev/null @@ -1,587 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// - /// A Class representing a StepResource along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetStepResource method. - /// Otherwise you can get one from its parent resource using the GetStepResource method. - /// - public partial class StepResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string stepName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _stepResourceStepsClientDiagnostics; - private readonly StepsRestOperations _stepResourceStepsRestClient; - private readonly StepResourceData _data; - - /// Initializes a new instance of the class for mocking. - protected StepResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal StepResource(ArmClient client, StepResourceData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal StepResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _stepResourceStepsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DeploymentManager", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string stepResourceStepsApiVersion); - _stepResourceStepsRestClient = new StepsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, stepResourceStepsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DeploymentManager/steps"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual StepResourceData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets the step. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_Get - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResource.Get"); - scope.Start(); - try - { - var response = await _stepResourceStepsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new StepResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the step. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_Get - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResource.Get"); - scope.Start(); - try - { - var response = _stepResourceStepsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new StepResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the step. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResource.Delete"); - scope.Start(); - try - { - var response = await _stepResourceStepsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DeploymentManagerArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the step. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResource.Delete"); - scope.Start(); - try - { - var response = _stepResourceStepsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new DeploymentManagerArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Synchronously creates a new step or updates an existing step. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The step object. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, StepResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResource.Update"); - scope.Start(); - try - { - var response = await _stepResourceStepsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new DeploymentManagerArmOperation(Response.FromValue(new StepResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Synchronously creates a new step or updates an existing step. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The step object. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, StepResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResource.Update"); - scope.Start(); - try - { - var response = _stepResourceStepsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken); - var operation = new DeploymentManagerArmOperation(Response.FromValue(new StepResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _stepResourceStepsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new StepResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _stepResourceStepsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new StepResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags[key] = value; - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _stepResourceStepsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new StepResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _stepResourceStepsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new StepResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _stepResourceStepsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new StepResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _stepResourceStepsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new StepResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.Remove(key); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/StepResourceCollection.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/StepResourceCollection.cs deleted file mode 100644 index bd55aa5298775..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/StepResourceCollection.cs +++ /dev/null @@ -1,414 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetStepResources method from an instance of . - /// - public partial class StepResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _stepResourceStepsClientDiagnostics; - private readonly StepsRestOperations _stepResourceStepsRestClient; - - /// Initializes a new instance of the class for mocking. - protected StepResourceCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal StepResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _stepResourceStepsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DeploymentManager", StepResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(StepResource.ResourceType, out string stepResourceStepsApiVersion); - _stepResourceStepsRestClient = new StepsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, stepResourceStepsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); - } - - /// - /// Synchronously creates a new step or updates an existing step. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the deployment step. - /// The step object. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string stepName, StepResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(stepName, nameof(stepName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _stepResourceStepsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, stepName, data, cancellationToken).ConfigureAwait(false); - var operation = new DeploymentManagerArmOperation(Response.FromValue(new StepResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Synchronously creates a new step or updates an existing step. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the deployment step. - /// The step object. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string stepName, StepResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(stepName, nameof(stepName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _stepResourceStepsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, stepName, data, cancellationToken); - var operation = new DeploymentManagerArmOperation(Response.FromValue(new StepResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the step. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_Get - /// - /// - /// - /// The name of the deployment step. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string stepName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(stepName, nameof(stepName)); - - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResourceCollection.Get"); - scope.Start(); - try - { - var response = await _stepResourceStepsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, stepName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new StepResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the step. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_Get - /// - /// - /// - /// The name of the deployment step. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string stepName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(stepName, nameof(stepName)); - - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResourceCollection.Get"); - scope.Start(); - try - { - var response = _stepResourceStepsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, stepName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new StepResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists the steps in a resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps - /// - /// - /// Operation Id - /// Steps_List - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _stepResourceStepsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new StepResource(Client, StepResourceData.DeserializeStepResourceData(e)), _stepResourceStepsClientDiagnostics, Pipeline, "StepResourceCollection.GetAll", "", null, cancellationToken); - } - - /// - /// Lists the steps in a resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps - /// - /// - /// Operation Id - /// Steps_List - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _stepResourceStepsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new StepResource(Client, StepResourceData.DeserializeStepResourceData(e)), _stepResourceStepsClientDiagnostics, Pipeline, "StepResourceCollection.GetAll", "", null, cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_Get - /// - /// - /// - /// The name of the deployment step. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string stepName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(stepName, nameof(stepName)); - - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResourceCollection.Exists"); - scope.Start(); - try - { - var response = await _stepResourceStepsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, stepName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_Get - /// - /// - /// - /// The name of the deployment step. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string stepName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(stepName, nameof(stepName)); - - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResourceCollection.Exists"); - scope.Start(); - try - { - var response = _stepResourceStepsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, stepName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_Get - /// - /// - /// - /// The name of the deployment step. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string stepName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(stepName, nameof(stepName)); - - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResourceCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _stepResourceStepsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, stepName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new StepResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName} - /// - /// - /// Operation Id - /// Steps_Get - /// - /// - /// - /// The name of the deployment step. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string stepName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(stepName, nameof(stepName)); - - using var scope = _stepResourceStepsClientDiagnostics.CreateScope("StepResourceCollection.GetIfExists"); - scope.Start(); - try - { - var response = _stepResourceStepsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, stepName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new StepResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/StepResourceData.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/StepResourceData.cs deleted file mode 100644 index 224066cb7132c..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Generated/StepResourceData.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.DeploymentManager.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DeploymentManager -{ - /// - /// A class representing the StepResource data model. - /// The resource representation of a rollout step. - /// - public partial class StepResourceData : TrackedResourceData - { - /// Initializes a new instance of StepResourceData. - /// The location. - /// - /// The properties that define the step. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// is null. - public StepResourceData(AzureLocation location, StepProperties properties) : base(location) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of StepResourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// - /// The properties that define the step. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - internal StepResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, StepProperties properties) : base(id, name, resourceType, systemData, tags, location) - { - Properties = properties; - } - - /// - /// The properties that define the step. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public StepProperties Properties { get; set; } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Properties/AssemblyInfo.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Properties/AssemblyInfo.cs deleted file mode 100644 index 235fbd2b0d309..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Runtime.CompilerServices; - -[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.DeploymentManager")] - -[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] -[assembly: InternalsVisibleTo("Azure.ResourceManager.DeploymentManager.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/autorest.md b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/autorest.md deleted file mode 100644 index d3eba66cbbfc8..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/src/autorest.md +++ /dev/null @@ -1,93 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateCode` to generate code. - -``` yaml - -azure-arm: true -csharp: true -library-name: DeploymentManager -namespace: Azure.ResourceManager.DeploymentManager -# default tag is a preview version -require: https://github.com/Azure/azure-rest-api-specs/blob/2f28b5026a4b44adefd0237087acb0c48cfe31a6/specification/deploymentmanager/resource-manager/readme.md -output-folder: $(this-folder)/Generated -clear-output-folder: true -sample-gen: - output-folder: $(this-folder)/../samples/Generated - clear-output-folder: true - skipped-operations: - - Rollouts_CreateOrUpdate -skip-csproj: true -modelerfour: - flatten-payloads: false - -format-by-name-rules: - 'tenantId': 'uuid' - 'ETag': 'etag' - 'location': 'azure-location' - '*Uri': 'Uri' - '*Uris': 'Uri' - -acronym-mapping: - CPU: Cpu - CPUs: Cpus - Os: OS - Ip: IP - Ips: IPs|ips - ID: Id - IDs: Ids - VM: Vm - VMs: Vms - Vmos: VmOS - VMScaleSet: VmScaleSet - DNS: Dns - VPN: Vpn - NAT: Nat - WAN: Wan - Ipv4: IPv4|ipv4 - Ipv6: IPv6|ipv6 - Ipsec: IPsec|ipsec - SSO: Sso - URI: Uri - Etag: ETag|etag - -directive: - # It generates a new model if the property is `allOf`, that will cause dup model error. - # So the normal solution is changing all `allOf` property to direct `ref`, but `ref` doesn't support multiple target, - # to solve this problem here defines a temporary model `tempRolloutProperties` as a workaround. - - from: deploymentmanager.json - where: $.definitions - transform: > - $.tempRolloutProperties = { - 'description': 'All properties for a rollout.', - 'allOf': [ - { - '$ref': '#/definitions/RolloutRequestProperties' - }, - { - '$ref': '#/definitions/RolloutProperties' - } - ] - }; - - from: deploymentmanager.json - where: $.definitions - transform: > - delete $.ArtifactSource.properties.properties['allOf']; - $.ArtifactSource.properties.properties['$ref'] = '#/definitions/ArtifactSourceProperties'; - delete $.Rollout.properties.properties['allOf']; - $.Rollout.properties.properties['$ref'] = '#/definitions/tempRolloutProperties'; - # Fix durations - - from: deploymentmanager.json - where: $.definitions - transform: > - $.HealthCheckStepAttributes.properties.waitDuration['format'] = 'duration'; - $.HealthCheckStepAttributes.properties.maxElasticDuration['format'] = 'duration'; - $.HealthCheckStepAttributes.properties.healthyStateDuration['format'] = 'duration'; - $.WaitStepAttributes.properties.duration['format'] = 'duration'; - # `Rollout` is a superset of `RolloutRequest`, if not change this then the tag operations code can't pass compile - - from: deploymentmanager.json - where: $.paths['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName}'] - transform: > - $.put.responses['201']['schema']['$ref'] = '#/definitions/Rollout'; - -``` diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/tests/Azure.ResourceManager.DeploymentManager.Tests.csproj b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/tests/Azure.ResourceManager.DeploymentManager.Tests.csproj deleted file mode 100644 index 0793cd91c3af9..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/tests/Azure.ResourceManager.DeploymentManager.Tests.csproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/tests/DeploymentManagerManagementTestBase.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/tests/DeploymentManagerManagementTestBase.cs deleted file mode 100644 index c3399ada9ea30..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/tests/DeploymentManagerManagementTestBase.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; -using Azure.Core.TestFramework; -using Azure.ResourceManager.Resources; -using Azure.ResourceManager.TestFramework; -using NUnit.Framework; -using System.Threading.Tasks; - -namespace Azure.ResourceManager.DeploymentManager.Tests -{ - public class DeploymentManagerManagementTestBase : ManagementRecordedTestBase - { - protected ArmClient Client { get; private set; } - - protected DeploymentManagerManagementTestBase(bool isAsync, RecordedTestMode mode) - : base(isAsync, mode) - { - } - - protected DeploymentManagerManagementTestBase(bool isAsync) - : base(isAsync) - { - } - - [SetUp] - public void CreateCommonClient() - { - Client = GetArmClient(); - } - - protected async Task CreateResourceGroup(SubscriptionResource subscription, string rgNamePrefix, AzureLocation location) - { - string rgName = Recording.GenerateAssetName(rgNamePrefix); - ResourceGroupData input = new ResourceGroupData(location); - var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, input); - return lro.Value; - } - } -} diff --git a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/tests/DeploymentManagerManagementTestEnvironment.cs b/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/tests/DeploymentManagerManagementTestEnvironment.cs deleted file mode 100644 index e5fde1bfbbaee..0000000000000 --- a/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/tests/DeploymentManagerManagementTestEnvironment.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core.TestFramework; - -namespace Azure.ResourceManager.DeploymentManager.Tests -{ - public class DeploymentManagerManagementTestEnvironment : TestEnvironment - { - } -} \ No newline at end of file diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/AzSdk.RP.props b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/AzSdk.RP.props deleted file mode 100644 index bdd39f7ff3575..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/AzSdk.RP.props +++ /dev/null @@ -1,7 +0,0 @@ - - - - DeploymentManager_2019-11-01-preview; - $(PackageTags);$(CommonTags);$(AzureApiTag); - - \ No newline at end of file diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/Microsoft.Azure.Management.DeploymentManager.sln b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/Microsoft.Azure.Management.DeploymentManager.sln deleted file mode 100644 index 1f96c2dc25b62..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/Microsoft.Azure.Management.DeploymentManager.sln +++ /dev/null @@ -1,55 +0,0 @@ - -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", "src\Microsoft.Azure.Management.DeploymentManager.csproj", "{81E66A55-F17C-4088-80F6-EF7C01C11E37}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.DeploymentManager.Tests", "tests\Microsoft.Azure.Management.DeploymentManager.Tests.csproj", "{23CD2878-1A27-4ECD-80F9-8B9BB1539F7F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.ManagedServiceIdentity", "..\..\managedserviceidentity\Microsoft.Azure.Management.ManagedServiceIdentity\src\Microsoft.Azure.Management.ManagedServiceIdentity.csproj", "{15BB052A-CEF6-49BA-8010-E6D1FAD30099}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Authorization", "..\..\authorization\Microsoft.Azure.Management.Authorization\src\Microsoft.Azure.Management.Authorization.csproj", "{99EF70BF-5689-4175-8848-602904ADE9FC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Test.HttpRecorder", "..\..\mgmtcommon\TestFramework\Microsoft.Azure.Test.HttpRecorder\Microsoft.Azure.Test.HttpRecorder.csproj", "{65DA1E12-1386-4A73-B4C0-4E98FE9055C6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Rest.ClientRuntime.Azure.TestFramework", "..\..\mgmtcommon\TestFramework\ClientRuntime.Azure.TestFramework\Microsoft.Rest.ClientRuntime.Azure.TestFramework.csproj", "{B4B55EC1-AF32-4505-BFD5-941CD088400E}" -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 - {65DA1E12-1386-4A73-B4C0-4E98FE9055C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {65DA1E12-1386-4A73-B4C0-4E98FE9055C6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {65DA1E12-1386-4A73-B4C0-4E98FE9055C6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {65DA1E12-1386-4A73-B4C0-4E98FE9055C6}.Release|Any CPU.Build.0 = Release|Any CPU - {B4B55EC1-AF32-4505-BFD5-941CD088400E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B4B55EC1-AF32-4505-BFD5-941CD088400E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B4B55EC1-AF32-4505-BFD5-941CD088400E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B4B55EC1-AF32-4505-BFD5-941CD088400E}.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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/ReleaseNotes.md b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/ReleaseNotes.md deleted file mode 100644 index e23684bb708ad..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/ReleaseNotes.md +++ /dev/null @@ -1,7 +0,0 @@ -Below is a summary of the changes in the most recent release of Microsoft.Azure.Management.DeploymentManager. - -## v0.9.1-Preview -Add List API for resources. Add support for health check step. - -## v0.9.0-Preview -Add support for creating and managing rollouts and other supporting scenarios. \ No newline at end of file diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ArtifactSourcesOperations.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ArtifactSourcesOperations.cs deleted file mode 100644 index 30b34d11c23a0..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ArtifactSourcesOperations.cs +++ /dev/null @@ -1,886 +0,0 @@ -// -// 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; - } - - /// - /// Lists the artifact sources in a resource group. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (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 (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ArtifactSourcesOperationsExtensions.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ArtifactSourcesOperationsExtensions.cs deleted file mode 100644 index 335860563f53d..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ArtifactSourcesOperationsExtensions.cs +++ /dev/null @@ -1,192 +0,0 @@ -// -// 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 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(); - } - - /// - /// Lists the artifact sources in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - public static IList List(this IArtifactSourcesOperations operations, string resourceGroupName) - { - return operations.ListAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Lists the artifact sources in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IArtifactSourcesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/AzureDeploymentManagerClient.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/AzureDeploymentManagerClient.cs deleted file mode 100644 index e75bcdaaeb431..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/AzureDeploymentManagerClient.cs +++ /dev/null @@ -1,409 +0,0 @@ -// -// 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 = "2019-11-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")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); - CustomInitialize(); - DeserializationSettings.Converters.Add(new TransformationJsonConverter()); - DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); - } - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IArtifactSourcesOperations.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IArtifactSourcesOperations.cs deleted file mode 100644 index 716635b3e6547..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IArtifactSourcesOperations.cs +++ /dev/null @@ -1,128 +0,0 @@ -// -// 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)); - /// - /// Lists the artifact sources in a resource group. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IAzureDeploymentManagerClient.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IAzureDeploymentManagerClient.cs deleted file mode 100644 index 80032e4628143..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IAzureDeploymentManagerClient.cs +++ /dev/null @@ -1,113 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IOperations.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IOperations.cs deleted file mode 100644 index 822d142b7e6c9..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IOperations.cs +++ /dev/null @@ -1,46 +0,0 @@ -// -// 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 - { - /// - /// Lists the supported operations. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IRolloutsOperations.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IRolloutsOperations.cs deleted file mode 100644 index efec8a0292651..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IRolloutsOperations.cs +++ /dev/null @@ -1,229 +0,0 @@ -// -// 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)); - /// - /// Lists the rollouts in a resource group. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IServiceTopologiesOperations.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IServiceTopologiesOperations.cs deleted file mode 100644 index 8c2682bedc416..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IServiceTopologiesOperations.cs +++ /dev/null @@ -1,128 +0,0 @@ -// -// 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)); - /// - /// Lists the service topologies in the resource group. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IServiceUnitsOperations.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IServiceUnitsOperations.cs deleted file mode 100644 index beb1e87a34d41..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IServiceUnitsOperations.cs +++ /dev/null @@ -1,192 +0,0 @@ -// -// 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)); - /// - /// Lists the service units under a service in the service topology. - /// - /// - /// 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>> ListWithHttpMessagesAsync(string resourceGroupName, string serviceTopologyName, string serviceName, 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IServicesOperations.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IServicesOperations.cs deleted file mode 100644 index 4ad889a8cf9bb..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IServicesOperations.cs +++ /dev/null @@ -1,139 +0,0 @@ -// -// 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)); - /// - /// Lists the services in 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>> ListWithHttpMessagesAsync(string resourceGroupName, string serviceTopologyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IStepsOperations.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IStepsOperations.cs deleted file mode 100644 index 65c2c03149608..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/IStepsOperations.cs +++ /dev/null @@ -1,127 +0,0 @@ -// -// 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)); - /// - /// Lists the steps in a resource group. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ApiKeyAuthentication.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ApiKeyAuthentication.cs deleted file mode 100644 index d141e4fe0f63d..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ApiKeyAuthentication.cs +++ /dev/null @@ -1,92 +0,0 @@ -// -// 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; - - /// - /// ApiKey authentication gives a name and a value that can be included in - /// either the request header or query parameters. - /// - [Newtonsoft.Json.JsonObject("ApiKey")] - public partial class ApiKeyAuthentication : RestRequestAuthentication - { - /// - /// Initializes a new instance of the ApiKeyAuthentication class. - /// - public ApiKeyAuthentication() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ApiKeyAuthentication class. - /// - /// The key name of the authentication key/value - /// pair. - /// The location of the authentication - /// key/value pair in the request. Possible values include: 'Query', - /// 'Header' - /// The value of the authentication key/value - /// pair. - public ApiKeyAuthentication(string name, RestAuthLocation inProperty, string value) - { - Name = name; - InProperty = inProperty; - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the key name of the authentication key/value pair. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets the location of the authentication key/value pair in - /// the request. Possible values include: 'Query', 'Header' - /// - [JsonProperty(PropertyName = "in")] - public RestAuthLocation InProperty { get; set; } - - /// - /// Gets or sets the value of the authentication key/value pair. - /// - [JsonProperty(PropertyName = "value")] - public string Value { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Name"); - } - if (Value == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Value"); - } - } - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ArtifactSource.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ArtifactSource.cs deleted file mode 100644 index 5394b77d96287..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ArtifactSource.cs +++ /dev/null @@ -1,117 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ArtifactSourcePropertiesModel.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ArtifactSourcePropertiesModel.cs deleted file mode 100644 index 6a35b83230737..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ArtifactSourcePropertiesModel.cs +++ /dev/null @@ -1,104 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Authentication.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Authentication.cs deleted file mode 100644 index 938493020d666..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Authentication.cs +++ /dev/null @@ -1,36 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/AzureEntityResource.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/AzureEntityResource.cs deleted file mode 100644 index 520ee08adcdc5..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/AzureEntityResource.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/CloudErrorBody.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/CloudErrorBody.cs deleted file mode 100644 index 6f9be723569bb..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/CloudErrorBody.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/DeploymentMode.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/DeploymentMode.cs deleted file mode 100644 index 3a85ccb37f991..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/DeploymentMode.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/HealthCheckStepAttributes.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/HealthCheckStepAttributes.cs deleted file mode 100644 index 00ee33635c65c..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/HealthCheckStepAttributes.cs +++ /dev/null @@ -1,95 +0,0 @@ -// -// 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 attributes for the health check step. - /// - public partial class HealthCheckStepAttributes - { - /// - /// Initializes a new instance of the HealthCheckStepAttributes class. - /// - public HealthCheckStepAttributes() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the HealthCheckStepAttributes class. - /// - /// The duration in ISO 8601 format - /// for which the resource is expected to be continuously healthy. If - /// maxElasticDuration is specified, healthy state duration is enforced - /// after the detection of first healthy signal. - /// The duration in ISO 8601 format for - /// which health check waits idly without any checks. - /// The duration in ISO 8601 format - /// for which the health check waits for the resource to become - /// healthy. Health check fails if it doesn't. Health check starts to - /// enforce healthyStateDuration once resource becomes healthy. - public HealthCheckStepAttributes(string healthyStateDuration, string waitDuration = default(string), string maxElasticDuration = default(string)) - { - WaitDuration = waitDuration; - MaxElasticDuration = maxElasticDuration; - HealthyStateDuration = healthyStateDuration; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the duration in ISO 8601 format for which health check - /// waits idly without any checks. - /// - [JsonProperty(PropertyName = "waitDuration")] - public string WaitDuration { get; set; } - - /// - /// Gets or sets the duration in ISO 8601 format for which the health - /// check waits for the resource to become healthy. Health check fails - /// if it doesn't. Health check starts to enforce healthyStateDuration - /// once resource becomes healthy. - /// - [JsonProperty(PropertyName = "maxElasticDuration")] - public string MaxElasticDuration { get; set; } - - /// - /// Gets or sets the duration in ISO 8601 format for which the resource - /// is expected to be continuously healthy. If maxElasticDuration is - /// specified, healthy state duration is enforced after the detection - /// of first healthy signal. - /// - [JsonProperty(PropertyName = "healthyStateDuration")] - public string HealthyStateDuration { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (HealthyStateDuration == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "HealthyStateDuration"); - } - } - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/HealthCheckStepProperties.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/HealthCheckStepProperties.cs deleted file mode 100644 index b3f67c278b34f..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/HealthCheckStepProperties.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// 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 health check step. - /// - [Newtonsoft.Json.JsonObject("HealthCheck")] - public partial class HealthCheckStepProperties : StepProperties - { - /// - /// Initializes a new instance of the HealthCheckStepProperties class. - /// - public HealthCheckStepProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the HealthCheckStepProperties class. - /// - /// The health check step attributes - public HealthCheckStepProperties(HealthCheckStepAttributes attributes) - { - Attributes = attributes; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the health check step attributes - /// - [JsonProperty(PropertyName = "attributes")] - public HealthCheckStepAttributes Attributes { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Attributes == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Attributes"); - } - if (Attributes != null) - { - Attributes.Validate(); - } - } - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Identity.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Identity.cs deleted file mode 100644 index c20d1388fbd49..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Identity.cs +++ /dev/null @@ -1,79 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Message.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Message.cs deleted file mode 100644 index 51f11f81cde64..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Message.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Operation.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Operation.cs deleted file mode 100644 index 7363fb7d11454..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Operation.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/OperationDetail.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/OperationDetail.cs deleted file mode 100644 index 1d9f572f619a3..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/OperationDetail.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/OperationsList.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/OperationsList.cs deleted file mode 100644 index b1aa0910d9d3d..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/OperationsList.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// 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 operations response. - /// - public partial class OperationsList - { - /// - /// Initializes a new instance of the OperationsList class. - /// - public OperationsList() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OperationsList class. - /// - /// The list of supported operations - public OperationsList(Operation value = default(Operation)) - { - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the list of supported operations - /// - [JsonProperty(PropertyName = "value")] - public Operation Value { get; set; } - - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/PrePostStep.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/PrePostStep.cs deleted file mode 100644 index abb23ebcac0bd..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/PrePostStep.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ProxyResource.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ProxyResource.cs deleted file mode 100644 index 76f7d74e75708..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ProxyResource.cs +++ /dev/null @@ -1,50 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Resource.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Resource.cs deleted file mode 100644 index a1b477572c6d0..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Resource.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ResourceOperation.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ResourceOperation.cs deleted file mode 100644 index 6296bb9e502f1..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ResourceOperation.cs +++ /dev/null @@ -1,106 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestAuthLocation.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestAuthLocation.cs deleted file mode 100644 index 5d175236300d5..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestAuthLocation.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// 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 RestAuthLocation. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum RestAuthLocation - { - [EnumMember(Value = "Query")] - Query, - [EnumMember(Value = "Header")] - Header - } - internal static class RestAuthLocationEnumExtension - { - internal static string ToSerializedValue(this RestAuthLocation? value) - { - return value == null ? null : ((RestAuthLocation)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this RestAuthLocation value) - { - switch( value ) - { - case RestAuthLocation.Query: - return "Query"; - case RestAuthLocation.Header: - return "Header"; - } - return null; - } - - internal static RestAuthLocation? ParseRestAuthLocation(this string value) - { - switch( value ) - { - case "Query": - return RestAuthLocation.Query; - case "Header": - return RestAuthLocation.Header; - } - return null; - } - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestHealthCheck.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestHealthCheck.cs deleted file mode 100644 index e8860835065ed..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestHealthCheck.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// 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; - - /// - /// A REST based health check - /// - public partial class RestHealthCheck - { - /// - /// Initializes a new instance of the RestHealthCheck class. - /// - public RestHealthCheck() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the RestHealthCheck class. - /// - /// A unique name for this check. - /// The request to the health provider. - /// The expected response from the health - /// provider. If no expected response is provided, the default is to - /// expect the received response to have an HTTP status code of 200 - /// OK. - public RestHealthCheck(string name, RestRequest request, RestResponse response = default(RestResponse)) - { - Name = name; - Request = request; - Response = response; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets a unique name for this check. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets the request to the health provider. - /// - [JsonProperty(PropertyName = "request")] - public RestRequest Request { get; set; } - - /// - /// Gets or sets the expected response from the health provider. If no - /// expected response is provided, the default is to expect the - /// received response to have an HTTP status code of 200 OK. - /// - [JsonProperty(PropertyName = "response")] - public RestResponse Response { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Name"); - } - if (Request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Request"); - } - if (Request != null) - { - Request.Validate(); - } - } - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestHealthCheckStepAttributes.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestHealthCheckStepAttributes.cs deleted file mode 100644 index a085d9d89e010..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestHealthCheckStepAttributes.cs +++ /dev/null @@ -1,95 +0,0 @@ -// -// 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 REST health check step properties. - /// - [Newtonsoft.Json.JsonObject("REST")] - [Rest.Serialization.JsonTransformation] - public partial class RestHealthCheckStepAttributes : HealthCheckStepAttributes - { - /// - /// Initializes a new instance of the RestHealthCheckStepAttributes - /// class. - /// - public RestHealthCheckStepAttributes() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the RestHealthCheckStepAttributes - /// class. - /// - /// The duration in ISO 8601 format - /// for which the resource is expected to be continuously healthy. If - /// maxElasticDuration is specified, healthy state duration is enforced - /// after the detection of first healthy signal. - /// The list of checks that form the health - /// check step. - /// The duration in ISO 8601 format for - /// which health check waits idly without any checks. - /// The duration in ISO 8601 format - /// for which the health check waits for the resource to become - /// healthy. Health check fails if it doesn't. Health check starts to - /// enforce healthyStateDuration once resource becomes healthy. - public RestHealthCheckStepAttributes(string healthyStateDuration, IList healthChecks, string waitDuration = default(string), string maxElasticDuration = default(string)) - : base(healthyStateDuration, waitDuration, maxElasticDuration) - { - HealthChecks = healthChecks; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the list of checks that form the health check step. - /// - [JsonProperty(PropertyName = "properties.healthChecks")] - public IList HealthChecks { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - if (HealthChecks == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "HealthChecks"); - } - if (HealthChecks != null) - { - foreach (var element in HealthChecks) - { - if (element != null) - { - element.Validate(); - } - } - } - } - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestMatchQuantifier.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestMatchQuantifier.cs deleted file mode 100644 index b86f448ace0a0..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestMatchQuantifier.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// 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 RestMatchQuantifier. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum RestMatchQuantifier - { - [EnumMember(Value = "All")] - All, - [EnumMember(Value = "Any")] - Any - } - internal static class RestMatchQuantifierEnumExtension - { - internal static string ToSerializedValue(this RestMatchQuantifier? value) - { - return value == null ? null : ((RestMatchQuantifier)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this RestMatchQuantifier value) - { - switch( value ) - { - case RestMatchQuantifier.All: - return "All"; - case RestMatchQuantifier.Any: - return "Any"; - } - return null; - } - - internal static RestMatchQuantifier? ParseRestMatchQuantifier(this string value) - { - switch( value ) - { - case "All": - return RestMatchQuantifier.All; - case "Any": - return RestMatchQuantifier.Any; - } - return null; - } - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestRequest.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestRequest.cs deleted file mode 100644 index 9b8a5e0f7131c..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestRequest.cs +++ /dev/null @@ -1,89 +0,0 @@ -// -// 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 make up a REST request - /// - public partial class RestRequest - { - /// - /// Initializes a new instance of the RestRequest class. - /// - public RestRequest() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the RestRequest class. - /// - /// The HTTP method to use for the request. - /// Possible values include: 'GET', 'POST' - /// The HTTP URI to use for the request. - /// The authentication information - /// required in the request to the health provider. - public RestRequest(RestRequestMethod method, string uri, RestRequestAuthentication authentication) - { - Method = method; - Uri = uri; - Authentication = authentication; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the HTTP method to use for the request. Possible - /// values include: 'GET', 'POST' - /// - [JsonProperty(PropertyName = "method")] - public RestRequestMethod Method { get; set; } - - /// - /// Gets or sets the HTTP URI to use for the request. - /// - [JsonProperty(PropertyName = "uri")] - public string Uri { get; set; } - - /// - /// Gets or sets the authentication information required in the request - /// to the health provider. - /// - [JsonProperty(PropertyName = "authentication")] - public RestRequestAuthentication Authentication { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Uri == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Uri"); - } - if (Authentication == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Authentication"); - } - } - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestRequestAuthentication.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestRequestAuthentication.cs deleted file mode 100644 index 7dd65276afa55..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestRequestAuthentication.cs +++ /dev/null @@ -1,36 +0,0 @@ -// -// 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 authentication information required in the REST health check - /// request to the health provider. - /// - public partial class RestRequestAuthentication - { - /// - /// Initializes a new instance of the RestRequestAuthentication class. - /// - public RestRequestAuthentication() - { - CustomInit(); - } - - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestRequestMethod.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestRequestMethod.cs deleted file mode 100644 index 19771e75fa25a..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestRequestMethod.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// 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 RestRequestMethod. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum RestRequestMethod - { - [EnumMember(Value = "GET")] - GET, - [EnumMember(Value = "POST")] - POST - } - internal static class RestRequestMethodEnumExtension - { - internal static string ToSerializedValue(this RestRequestMethod? value) - { - return value == null ? null : ((RestRequestMethod)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this RestRequestMethod value) - { - switch( value ) - { - case RestRequestMethod.GET: - return "GET"; - case RestRequestMethod.POST: - return "POST"; - } - return null; - } - - internal static RestRequestMethod? ParseRestRequestMethod(this string value) - { - switch( value ) - { - case "GET": - return RestRequestMethod.GET; - case "POST": - return RestRequestMethod.POST; - } - return null; - } - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestResponse.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestResponse.cs deleted file mode 100644 index 6a939d28b2357..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestResponse.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// 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; - - /// - /// The properties that make up the expected REST response - /// - public partial class RestResponse - { - /// - /// Initializes a new instance of the RestResponse class. - /// - public RestResponse() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the RestResponse class. - /// - /// The HTTP status codes expected in - /// a successful health check response. The response is expected to - /// match one of the given status codes. If no expected status codes - /// are provided, default expected status code is 200 OK. - /// The regular expressions to match the response - /// content with. - public RestResponse(IList successStatusCodes = default(IList), RestResponseRegex regex = default(RestResponseRegex)) - { - SuccessStatusCodes = successStatusCodes; - Regex = regex; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the HTTP status codes expected in a successful health - /// check response. The response is expected to match one of the given - /// status codes. If no expected status codes are provided, default - /// expected status code is 200 OK. - /// - [JsonProperty(PropertyName = "successStatusCodes")] - public IList SuccessStatusCodes { get; set; } - - /// - /// Gets or sets the regular expressions to match the response content - /// with. - /// - [JsonProperty(PropertyName = "regex")] - public RestResponseRegex Regex { get; set; } - - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestResponseRegex.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestResponseRegex.cs deleted file mode 100644 index cd2f8fa17cd05..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RestResponseRegex.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// 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; - - /// - /// The regular expressions to match the response content with. - /// - public partial class RestResponseRegex - { - /// - /// Initializes a new instance of the RestResponseRegex class. - /// - public RestResponseRegex() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the RestResponseRegex class. - /// - /// The list of regular expressions. - /// Indicates whether any or all of the - /// expressions should match with the response content. Possible values - /// include: 'All', 'Any' - public RestResponseRegex(IList matches = default(IList), RestMatchQuantifier? matchQuantifier = default(RestMatchQuantifier?)) - { - Matches = matches; - MatchQuantifier = matchQuantifier; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the list of regular expressions. - /// - [JsonProperty(PropertyName = "matches")] - public IList Matches { get; set; } - - /// - /// Gets or sets indicates whether any or all of the expressions should - /// match with the response content. Possible values include: 'All', - /// 'Any' - /// - [JsonProperty(PropertyName = "matchQuantifier")] - public RestMatchQuantifier? MatchQuantifier { get; set; } - - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Rollout.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Rollout.cs deleted file mode 100644 index 54e9b3f069387..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Rollout.cs +++ /dev/null @@ -1,187 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutIdentityAuthentication.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutIdentityAuthentication.cs deleted file mode 100644 index 5532ad7d0a7f3..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutIdentityAuthentication.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -// 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; - - /// - /// RolloutIdentity uses the user-assigned managed identity authentication - /// context specified in the Identity property during rollout creation. - /// - [Newtonsoft.Json.JsonObject("RolloutIdentity")] - public partial class RolloutIdentityAuthentication : RestRequestAuthentication - { - /// - /// Initializes a new instance of the RolloutIdentityAuthentication - /// class. - /// - public RolloutIdentityAuthentication() - { - CustomInit(); - } - - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutOperationInfo.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutOperationInfo.cs deleted file mode 100644 index 4619b9df76596..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutOperationInfo.cs +++ /dev/null @@ -1,96 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutPropertiesModel.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutPropertiesModel.cs deleted file mode 100644 index 0878c212d6f3b..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutPropertiesModel.cs +++ /dev/null @@ -1,81 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutRequest.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutRequest.cs deleted file mode 100644 index 4744847180d83..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutRequest.cs +++ /dev/null @@ -1,145 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutStep.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutStep.cs deleted file mode 100644 index 1703e4bde00da..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutStep.cs +++ /dev/null @@ -1,112 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutsCreateOrUpdateHeaders.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutsCreateOrUpdateHeaders.cs deleted file mode 100644 index 52065f65b803e..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/RolloutsCreateOrUpdateHeaders.cs +++ /dev/null @@ -1,55 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/SasAuthentication.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/SasAuthentication.cs deleted file mode 100644 index dd015fb63259d..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/SasAuthentication.cs +++ /dev/null @@ -1,73 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Service.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Service.cs deleted file mode 100644 index 80e2090143a74..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/Service.cs +++ /dev/null @@ -1,90 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceProperties.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceProperties.cs deleted file mode 100644 index 5da7f89adb50e..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceProperties.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceResource.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceResource.cs deleted file mode 100644 index 522dac59ccdd1..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceResource.cs +++ /dev/null @@ -1,98 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceTopologyProperties.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceTopologyProperties.cs deleted file mode 100644 index f651792787763..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceTopologyProperties.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceTopologyResource.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceTopologyResource.cs deleted file mode 100644 index 54adf27eeb2d7..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceTopologyResource.cs +++ /dev/null @@ -1,79 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnit.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnit.cs deleted file mode 100644 index 190361c3281f8..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnit.cs +++ /dev/null @@ -1,89 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnitArtifacts.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnitArtifacts.cs deleted file mode 100644 index cee7c916e0e12..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnitArtifacts.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnitProperties.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnitProperties.cs deleted file mode 100644 index dfad522eed1b0..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnitProperties.cs +++ /dev/null @@ -1,87 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnitResource.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnitResource.cs deleted file mode 100644 index 14d81391c8ab9..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnitResource.cs +++ /dev/null @@ -1,102 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnitsCreateOrUpdateHeaders.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnitsCreateOrUpdateHeaders.cs deleted file mode 100644 index dd3f65034c2f8..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/ServiceUnitsCreateOrUpdateHeaders.cs +++ /dev/null @@ -1,55 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/StepGroup.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/StepGroup.cs deleted file mode 100644 index 82e35d9f4fc3f..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/StepGroup.cs +++ /dev/null @@ -1,133 +0,0 @@ -// -// 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 a Step group in a rollout. - /// - public partial class StepGroup - { - /// - /// Initializes a new instance of the StepGroup class. - /// - public StepGroup() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StepGroup 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 StepGroup(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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/StepOperationInfo.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/StepOperationInfo.cs deleted file mode 100644 index 19bd8b20d6371..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/StepOperationInfo.cs +++ /dev/null @@ -1,95 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/StepProperties.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/StepProperties.cs deleted file mode 100644 index 9155408cbae51..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/StepProperties.cs +++ /dev/null @@ -1,35 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/StepResource.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/StepResource.cs deleted file mode 100644 index 6f0efca8183e8..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/StepResource.cs +++ /dev/null @@ -1,79 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/TrackedResource.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/TrackedResource.cs deleted file mode 100644 index 5143dbe544696..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/TrackedResource.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/WaitStepAttributes.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/WaitStepAttributes.cs deleted file mode 100644 index 1ceddd7fbd0a9..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/WaitStepAttributes.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/WaitStepProperties.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/WaitStepProperties.cs deleted file mode 100644 index ccc0bc9957215..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Models/WaitStepProperties.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// 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 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) - { - 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) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Attributes"); - } - if (Attributes != null) - { - Attributes.Validate(); - } - } - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Operations.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Operations.cs deleted file mode 100644 index cf6b197ba0da2..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/Operations.cs +++ /dev/null @@ -1,227 +0,0 @@ -// -// 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; } - - /// - /// Lists the supported operations. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.DeploymentManager/operations").ToString(); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/OperationsExtensions.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/OperationsExtensions.cs deleted file mode 100644 index 7db9cf8636a59..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/OperationsExtensions.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// 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 Operations. - /// - public static partial class OperationsExtensions - { - /// - /// Lists the supported operations. - /// - /// - /// The operations group for this extension method. - /// - public static OperationsList List(this IOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Lists the supported operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/RolloutsOperations.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/RolloutsOperations.cs deleted file mode 100644 index 9acfc951550ee..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/RolloutsOperations.cs +++ /dev/null @@ -1,1378 +0,0 @@ -// -// 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; - } - - /// - /// Lists the rollouts in a resource group. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (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 (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/RolloutsOperationsExtensions.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/RolloutsOperationsExtensions.cs deleted file mode 100644 index de59ec0a1cdb2..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/RolloutsOperationsExtensions.cs +++ /dev/null @@ -1,362 +0,0 @@ -// -// 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 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; - } - } - - /// - /// Lists the rollouts in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - public static IList List(this IRolloutsOperations operations, string resourceGroupName) - { - return operations.ListAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Lists the rollouts in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IRolloutsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServiceTopologiesOperations.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServiceTopologiesOperations.cs deleted file mode 100644 index 6314f679d0cf9..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServiceTopologiesOperations.cs +++ /dev/null @@ -1,890 +0,0 @@ -// -// 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; - } - - /// - /// Lists the service topologies in the resource group. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (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 (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServiceTopologiesOperationsExtensions.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServiceTopologiesOperationsExtensions.cs deleted file mode 100644 index 401a013419cef..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServiceTopologiesOperationsExtensions.cs +++ /dev/null @@ -1,192 +0,0 @@ -// -// 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 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(); - } - - /// - /// Lists the service topologies in the resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - public static IList List(this IServiceTopologiesOperations operations, string resourceGroupName) - { - return operations.ListAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Lists the service topologies in the resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IServiceTopologiesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServiceUnitsOperations.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServiceUnitsOperations.cs deleted file mode 100644 index 0e957eb6fc353..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServiceUnitsOperations.cs +++ /dev/null @@ -1,1012 +0,0 @@ -// -// 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; - } - - /// - /// Lists the service units under a service in the service topology. - /// - /// - /// 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>> ListWithHttpMessagesAsync(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, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits").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; - } - - /// - /// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServiceUnitsOperationsExtensions.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServiceUnitsOperationsExtensions.cs deleted file mode 100644 index 751dd1cecb5eb..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServiceUnitsOperationsExtensions.cs +++ /dev/null @@ -1,310 +0,0 @@ -// -// 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 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(); - } - - /// - /// Lists the service units under a service in 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 name of the service resource. - /// - public static IList List(this IServiceUnitsOperations operations, string resourceGroupName, string serviceTopologyName, string serviceName) - { - return operations.ListAsync(resourceGroupName, serviceTopologyName, serviceName).GetAwaiter().GetResult(); - } - - /// - /// Lists the service units under a service in 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 name of the service resource. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IServiceUnitsOperations operations, string resourceGroupName, string serviceTopologyName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, serviceTopologyName, serviceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServicesOperations.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServicesOperations.cs deleted file mode 100644 index 0d63430f65b24..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServicesOperations.cs +++ /dev/null @@ -1,925 +0,0 @@ -// -// 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; - } - - /// - /// Lists the services in 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>> ListWithHttpMessagesAsync(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, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services").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; - } - - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServicesOperationsExtensions.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServicesOperationsExtensions.cs deleted file mode 100644 index a92567604f772..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/ServicesOperationsExtensions.cs +++ /dev/null @@ -1,214 +0,0 @@ -// -// 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 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(); - } - - /// - /// Lists the services in 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 IList List(this IServicesOperations operations, string resourceGroupName, string serviceTopologyName) - { - return operations.ListAsync(resourceGroupName, serviceTopologyName).GetAwaiter().GetResult(); - } - - /// - /// Lists the services in 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> ListAsync(this IServicesOperations operations, string resourceGroupName, string serviceTopologyName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, serviceTopologyName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/StepsOperations.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/StepsOperations.cs deleted file mode 100644 index 6e5f2e41bc2b8..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/StepsOperations.cs +++ /dev/null @@ -1,885 +0,0 @@ -// -// 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; - } - - /// - /// Lists the steps in a resource group. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (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 (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/StepsOperationsExtensions.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/StepsOperationsExtensions.cs deleted file mode 100644 index 6c3e41b11ad55..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Generated/StepsOperationsExtensions.cs +++ /dev/null @@ -1,190 +0,0 @@ -// -// 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 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(); - } - - /// - /// Lists the steps in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - public static IList List(this IStepsOperations operations, string resourceGroupName) - { - return operations.ListAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Lists the steps in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IStepsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Microsoft.Azure.Management.DeploymentManager.csproj b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Microsoft.Azure.Management.DeploymentManager.csproj deleted file mode 100644 index 138cefcc1fa59..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Microsoft.Azure.Management.DeploymentManager.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - Microsoft.Azure.Management.DeploymentManager - Provides Deployment Manager management capabilities for Microsoft Azure. - 0.9.1-preview - Microsoft.Azure.Management.DeploymentManager - Microsoft Azure Deployment Manager;Deployment Manager; - - - - - - - $(SdkTargetFx) - - - - - - \ No newline at end of file diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Properties/AssemblyInfo.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Properties/AssemblyInfo.cs deleted file mode 100644 index e301487b288da..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,20 +0,0 @@ -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/generate.ps1 b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/generate.ps1 deleted file mode 100644 index 3446cb757b157..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/src/generate.ps1 +++ /dev/null @@ -1 +0,0 @@ -Start-AutoRestCodeGeneration -ResourceProvider "deploymentmanager/resource-manager" -AutoRestVersion "v2" \ No newline at end of file diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Helpers/DeploymentManagerClientHelper.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Helpers/DeploymentManagerClientHelper.cs deleted file mode 100644 index 49103f3e434a9..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Helpers/DeploymentManagerClientHelper.cs +++ /dev/null @@ -1,233 +0,0 @@ -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Helpers/DeploymentManagerTestUtilities.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Helpers/DeploymentManagerTestUtilities.cs deleted file mode 100644 index cbe73a5dbc090..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Helpers/DeploymentManagerTestUtilities.cs +++ /dev/null @@ -1,61 +0,0 @@ -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Helpers/RecordedDelegatingHandler.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Helpers/RecordedDelegatingHandler.cs deleted file mode 100644 index 5a4ab1bada986..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Helpers/RecordedDelegatingHandler.cs +++ /dev/null @@ -1,90 +0,0 @@ -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Microsoft.Azure.Management.DeploymentManager.Tests.csproj b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Microsoft.Azure.Management.DeploymentManager.Tests.csproj deleted file mode 100644 index 7ae61a23cb321..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Microsoft.Azure.Management.DeploymentManager.Tests.csproj +++ /dev/null @@ -1,46 +0,0 @@ - - - - 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Properties/AssemblyInfo.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Properties/AssemblyInfo.cs deleted file mode 100644 index 8b8ad7d79dc2a..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,39 +0,0 @@ -// 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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/SessionRecords/EndToEndFunctionalTests/TopologyAndRolloutScenarioTest.json b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/SessionRecords/EndToEndFunctionalTests/TopologyAndRolloutScenarioTest.json deleted file mode 100644 index c140ab0211bd5..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/SessionRecords/EndToEndFunctionalTests/TopologyAndRolloutScenarioTest.json +++ /dev/null @@ -1,5904 +0,0 @@ -{ - "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": [ - "258641f4-d876-4158-a994-82b64ec5193d" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:29:46 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "4088008f-76e9-4d99-859d-c7f0d6a6d241" - ], - "x-ms-correlation-request-id": [ - "4088008f-76e9-4d99-859d-c7f0d6a6d241" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T002947Z:4088008f-76e9-4d99-859d-c7f0d6a6d241" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "4577" - ], - "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\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Australia Central\",\r\n \"Australia Central 2\",\r\n \"Brazil South\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"France South\",\r\n \"South Africa North\",\r\n \"South Africa West\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-11-01-preview\",\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\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Australia Central\",\r\n \"Australia Central 2\",\r\n \"Brazil South\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"France South\",\r\n \"South Africa North\",\r\n \"South Africa West\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-11-01-preview\",\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\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Australia Central\",\r\n \"Australia Central 2\",\r\n \"Brazil South\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"France South\",\r\n \"South Africa North\",\r\n \"South Africa West\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-11-01-preview\",\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\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Australia Central\",\r\n \"Australia Central 2\",\r\n \"Brazil South\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"France South\",\r\n \"South Africa North\",\r\n \"South Africa West\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-11-01-preview\",\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\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Australia Central\",\r\n \"Australia Central 2\",\r\n \"Brazil South\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"France South\",\r\n \"South Africa North\",\r\n \"South Africa West\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-11-01-preview\",\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\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Australia Central\",\r\n \"Australia Central 2\",\r\n \"Brazil South\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"France South\",\r\n \"South Africa North\",\r\n \"South Africa West\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-11-01-preview\",\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 \"2019-11-01-preview\",\r\n \"2018-09-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-11-01-preview\",\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/admsdknet768?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlZ3JvdXBzL2FkbXNka25ldDc2OD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "20efbbf2-d23b-4af0-9ded-32169335b1df" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "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, 12 Dec 2019 00:29:48 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "fe590cb2-2a6b-4f67-ac5c-b58e3bbc9705" - ], - "x-ms-correlation-request-id": [ - "fe590cb2-2a6b-4f67-ac5c-b58e3bbc9705" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T002948Z:fe590cb2-2a6b-4f67-ac5c-b58e3bbc9705" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "180" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768\",\r\n \"name\": \"admsdknet768\",\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/admsdknet768?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlZ3JvdXBzL2FkbXNka25ldDc2OD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4a5d5b94-ebe0-452d-95e8-75e796eb86ab" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:29:48 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "6b01bc45-fdb5-4cd2-804f-63585d2f2c8e" - ], - "x-ms-correlation-request-id": [ - "6b01bc45-fdb5-4cd2-804f-63585d2f2c8e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T002948Z:6b01bc45-fdb5-4cd2-804f-63585d2f2c8e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "180" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768\",\r\n \"name\": \"admsdknet768\",\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": [ - "b41141fa-936c-4bee-adaf-b11eebb9679c" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:29:48 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "2c4163d6-b4f7-4aa8-82b4-d4f941ca6d3c" - ], - "x-ms-correlation-request-id": [ - "2c4163d6-b4f7-4aa8-82b4-d4f941ca6d3c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T002948Z:2c4163d6-b4f7-4aa8-82b4-d4f941ca6d3c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "11023" - ], - "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 \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Germany West Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\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 \"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 \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Germany West Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\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 \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Germany West Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\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 \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Germany West Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\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 \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Germany West Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\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 \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Germany West Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\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 \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Germany West Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\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 \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Germany West Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\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 \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Germany West Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\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 \"2019-06-01\",\r\n \"2019-04-01\",\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 \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Germany West Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\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 \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Germany West Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\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 \"2019-06-01\",\r\n \"2019-04-01\",\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 \"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 \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Germany West Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\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/checkNameAvailability\",\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 \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Germany West Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2018-11-01\",\r\n \"2018-07-01\",\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\": \"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 \"UAE 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 \"UAE 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/admsdknet768/providers/Microsoft.Storage/storageAccounts/admsdknet768stgacct?api-version=2015-06-15", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL2FkbXNka25ldDc2OHN0Z2FjY3Q/YXBpLXZlcnNpb249MjAxNS0wNi0xNQ==", - "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": [ - "83eb7d65-2067-4575-bffb-5f75072d8b7a" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "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, 12 Dec 2019 00:29:50 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.Storage/locations/eastus/asyncoperations/97d06cbb-dd51-417f-b53b-0d583dc750df?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": [ - "97d06cbb-dd51-417f-b53b-0d583dc750df" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "d6907dc6-73de-4d16-b1a0-155af8732561" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T002950Z:d6907dc6-73de-4d16-b1a0-155af8732561" - ], - "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/97d06cbb-dd51-417f-b53b-0d583dc750df?monitor=true&api-version=2015-06-15", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9sb2NhdGlvbnMvZWFzdHVzL2FzeW5jb3BlcmF0aW9ucy85N2QwNmNiYi1kZDUxLTQxN2YtYjUzYi0wZDU4M2RjNzUwZGY/bW9uaXRvcj10cnVlJmFwaS12ZXJzaW9uPTIwMTUtMDYtMTU=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Storage.StorageManagementClient/4.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:30:19 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" - ], - "x-ms-request-id": [ - "e102e0c6-1790-4a9e-837d-8a8645bb69f3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "e2167a7b-62f1-448d-9005-7e52705af94f" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T003019Z:e2167a7b-62f1-448d-9005-7e52705af94f" - ], - "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/admsdknet768/providers/Microsoft.Storage/storageAccounts/admsdknet768stgacct/listKeys?api-version=2015-06-15", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL2FkbXNka25ldDc2OHN0Z2FjY3QvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNi0xNQ==", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3cafd779-b120-4565-81a4-73c728d7e336" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Storage.StorageManagementClient/4.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:30: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": [ - "3218efd3-5670-4bce-911a-1594d894b33d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "631a237d-65c7-4164-8bc3-6509b65fc9b9" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T003021Z:631a237d-65c7-4164-8bc3-6509b65fc9b9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "197" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"key1\": \"fviT4QWdjJNzo7qM0x/z/gue0dv7E4sY+1if0C2rnEwX0zPCnPyGlGTUxftccTgbcH8bjhJwjMQj/vipnPoVbA==\",\r\n \"key2\": \"149rLsMpmaU37sbKeLozQ/FJzf/Lq+E9gAgrPf5UE9tEEKe8IWFb9l/jcIrSZ77VdbYuZaiabnzSrkKJMGxxRQ==\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.Storage/storageAccounts/admsdknet768stgacct/listKeys?api-version=2015-06-15", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL2FkbXNka25ldDc2OHN0Z2FjY3QvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNi0xNQ==", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b7a6db99-859c-4579-9bd7-009144c3ead7" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Storage.StorageManagementClient/4.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:30:23 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" - ], - "x-ms-request-id": [ - "9bdaa445-b0dc-430d-96d7-a6498d32147c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "5159be2e-20f6-4b73-9512-ea46df1088c4" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T003023Z:5159be2e-20f6-4b73-9512-ea46df1088c4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "197" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"key1\": \"fviT4QWdjJNzo7qM0x/z/gue0dv7E4sY+1if0C2rnEwX0zPCnPyGlGTUxftccTgbcH8bjhJwjMQj/vipnPoVbA==\",\r\n \"key2\": \"149rLsMpmaU37sbKeLozQ/FJzf/Lq+E9gAgrPf5UE9tEEKe8IWFb9l/jcIrSZ77VdbYuZaiabnzSrkKJMGxxRQ==\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.Storage/storageAccounts/admsdknet768stgacct/listKeys?api-version=2015-06-15", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL2FkbXNka25ldDc2OHN0Z2FjY3QvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNi0xNQ==", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0b8c5ed2-4a34-4d14-afb0-8d7b7483728c" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Storage.StorageManagementClient/4.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:30:24 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" - ], - "x-ms-request-id": [ - "f969f5e1-976e-4bcd-a7c3-b30243523975" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], - "x-ms-correlation-request-id": [ - "38a322cf-1abb-4e7e-8c59-fdb83df15472" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T003024Z:38a322cf-1abb-4e7e-8c59-fdb83df15472" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "197" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"key1\": \"fviT4QWdjJNzo7qM0x/z/gue0dv7E4sY+1if0C2rnEwX0zPCnPyGlGTUxftccTgbcH8bjhJwjMQj/vipnPoVbA==\",\r\n \"key2\": \"149rLsMpmaU37sbKeLozQ/FJzf/Lq+E9gAgrPf5UE9tEEKe8IWFb9l/jcIrSZ77VdbYuZaiabnzSrkKJMGxxRQ==\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.Storage/storageAccounts/admsdknet768stgacct/listKeys?api-version=2015-06-15", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL2FkbXNka25ldDc2OHN0Z2FjY3QvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNi0xNQ==", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "baa7f437-2f24-437c-ad3e-f8ca37707b47" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Storage.StorageManagementClient/4.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:30:24 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" - ], - "x-ms-request-id": [ - "a80fdf09-3ddd-478f-a847-62d154b102d2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1196" - ], - "x-ms-correlation-request-id": [ - "4e41bef2-64a4-42dd-bec6-c4fa86256809" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T003024Z:4e41bef2-64a4-42dd-bec6-c4fa86256809" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "197" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"key1\": \"fviT4QWdjJNzo7qM0x/z/gue0dv7E4sY+1if0C2rnEwX0zPCnPyGlGTUxftccTgbcH8bjhJwjMQj/vipnPoVbA==\",\r\n \"key2\": \"149rLsMpmaU37sbKeLozQ/FJzf/Lq+E9gAgrPf5UE9tEEKe8IWFb9l/jcIrSZ77VdbYuZaiabnzSrkKJMGxxRQ==\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.Storage/storageAccounts/admsdknet768stgacct/listKeys?api-version=2015-06-15", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL2FkbXNka25ldDc2OHN0Z2FjY3QvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNi0xNQ==", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "761ab641-2684-4d7a-a648-6568b068cd3e" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Storage.StorageManagementClient/4.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:30:24 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" - ], - "x-ms-request-id": [ - "04338db9-61f6-4cf2-9c57-1e809f7adfd5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1195" - ], - "x-ms-correlation-request-id": [ - "42e7bd28-1c3c-4410-b6a7-1c9f2b96441d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T003025Z:42e7bd28-1c3c-4410-b6a7-1c9f2b96441d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "197" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"key1\": \"fviT4QWdjJNzo7qM0x/z/gue0dv7E4sY+1if0C2rnEwX0zPCnPyGlGTUxftccTgbcH8bjhJwjMQj/vipnPoVbA==\",\r\n \"key2\": \"149rLsMpmaU37sbKeLozQ/FJzf/Lq+E9gAgrPf5UE9tEEKe8IWFb9l/jcIrSZ77VdbYuZaiabnzSrkKJMGxxRQ==\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.Storage/storageAccounts/admsdknet768stgacct/listKeys?api-version=2015-06-15", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL2FkbXNka25ldDc2OHN0Z2FjY3QvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNi0xNQ==", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bc515f91-d68e-4d0e-a07e-75a80bd852e4" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Storage.StorageManagementClient/4.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:30:25 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" - ], - "x-ms-request-id": [ - "80cb382e-616b-4dca-a11f-807614dbb120" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1194" - ], - "x-ms-correlation-request-id": [ - "f3319cd0-449d-473e-8009-80d034f26bbb" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T003025Z:f3319cd0-449d-473e-8009-80d034f26bbb" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "197" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"key1\": \"fviT4QWdjJNzo7qM0x/z/gue0dv7E4sY+1if0C2rnEwX0zPCnPyGlGTUxftccTgbcH8bjhJwjMQj/vipnPoVbA==\",\r\n \"key2\": \"149rLsMpmaU37sbKeLozQ/FJzf/Lq+E9gAgrPf5UE9tEEKe8IWFb9l/jcIrSZ77VdbYuZaiabnzSrkKJMGxxRQ==\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.Storage/storageAccounts/admsdknet768stgacct/listKeys?api-version=2015-06-15", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL2FkbXNka25ldDc2OHN0Z2FjY3QvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNi0xNQ==", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "507a01fc-9f86-4334-96e7-e624b0ccd60e" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Storage.StorageManagementClient/4.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:15 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" - ], - "x-ms-request-id": [ - "f47e8870-551e-4b1d-a346-c9bd9d0df558" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "ed6c4850-b47b-468a-9cd8-c595956189b0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004116Z:ed6c4850-b47b-468a-9cd8-c595956189b0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "197" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"key1\": \"fviT4QWdjJNzo7qM0x/z/gue0dv7E4sY+1if0C2rnEwX0zPCnPyGlGTUxftccTgbcH8bjhJwjMQj/vipnPoVbA==\",\r\n \"key2\": \"149rLsMpmaU37sbKeLozQ/FJzf/Lq+E9gAgrPf5UE9tEEKe8IWFb9l/jcIrSZ77VdbYuZaiabnzSrkKJMGxxRQ==\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL2FydGlmYWN0U291cmNlcy9hZG1zZGtuZXQ3NjhBcnRpZmFjdFNvdXJjZT9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "PUT", - "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://admsdknet768stgacct.blob.core.windows.net/artifacts?sv=2017-04-17&sr=c&sig=OZ%2Fb3lSOqOJvpchLdAfN36zgYdd14zNBkIM3TMbnYL8%3D&st=2019-12-11T00%3A30%3A25Z&se=2019-12-14T00%3A30%3A25Z&sp=rl\"\r\n }\r\n }\r\n },\r\n \"location\": \"Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ff4fb53c-200f-40f2-8531-e8ee6b0a6a60" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "437" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:30:29 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "ff4fb53c-200f-40f2-8531-e8ee6b0a6a60" - ], - "x-ms-correlation-request-id": [ - "fa3c34ee-83b8-4815-8729-ed0ae6b5daa3" - ], - "x-ms-request-id": [ - "e8eac814-8b47-43c0-a67f-5d1eb1b242fc" - ], - "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": [ - "WESTUS:20191212T003030Z:fa3c34ee-83b8-4815-8729-ed0ae6b5daa3" - ], - "Content-Length": [ - "680" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "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://admsdknet768stgacct.blob.core.windows.net/artifacts?sv=2017-04-17&sr=c&sig=OZ%2Fb3lSOqOJvpchLdAfN36zgYdd14zNBkIM3TMbnYL8%3D&st=2019-12-11T00%3A30%3A25Z&se=2019-12-14T00%3A30%3A25Z&sp=rl\"\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/artifactSources\",\r\n \"apiVersion\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource\",\r\n \"name\": \"admsdknet768ArtifactSource\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neT9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource\"\r\n },\r\n \"location\": \"Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "76fbb898-2530-4197-88dd-24cfd4fec1b6" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "245" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:30:31 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "76fbb898-2530-4197-88dd-24cfd4fec1b6" - ], - "x-ms-correlation-request-id": [ - "55d0c2b1-3f08-4e37-9a81-4f99db9c99b4" - ], - "x-ms-request-id": [ - "f3bbfdcf-41d6-4830-8599-89d9a8ea4865" - ], - "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": [ - "WESTUS:20191212T003032Z:55d0c2b1-3f08-4e37-9a81-4f99db9c99b4" - ], - "Content-Length": [ - "551" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies\",\r\n \"apiVersion\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology\",\r\n \"name\": \"admsdknet768ServiceTopology\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neT9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768UpdatedArtifactSource\"\r\n },\r\n \"location\": \"Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8c87fd2c-1ad7-4993-90a7-9648ac4c0b72" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "252" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:17 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "8c87fd2c-1ad7-4993-90a7-9648ac4c0b72" - ], - "x-ms-correlation-request-id": [ - "d1a1163a-9bd7-4e99-a42f-95708ba6f5a2" - ], - "x-ms-request-id": [ - "ee0706e5-bd07-491f-bc9f-ce1c847fea5c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "X-Frame-Options": [ - "DENY" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1193" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004118Z:d1a1163a-9bd7-4e99-a42f-95708ba6f5a2" - ], - "Content-Length": [ - "558" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768UpdatedArtifactSource\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies\",\r\n \"apiVersion\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology\",\r\n \"name\": \"admsdknet768ServiceTopology\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neT9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c57dbda7-1aa7-4199-a5b4-a6c7f0f6dd35" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:30:31 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "c57dbda7-1aa7-4199-a5b4-a6c7f0f6dd35" - ], - "x-ms-correlation-request-id": [ - "a7a0fee0-69f4-4a88-ad63-657e5e556154" - ], - "x-ms-request-id": [ - "a12a86aa-d020-4621-87f1-16e724b34524" - ], - "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": [ - "WESTUS:20191212T003032Z:a7a0fee0-69f4-4a88-ad63-657e5e556154" - ], - "Content-Length": [ - "519" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies\",\r\n \"apiVersion\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology\",\r\n \"name\": \"admsdknet768ServiceTopology\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neT9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "207b17a2-edd3-4ea5-8d08-355268698f6b" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:21 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "f48890c1-8b07-4101-8b5c-a984c6700d48" - ], - "x-ms-correlation-request-id": [ - "f48890c1-8b07-4101-8b5c-a984c6700d48" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004122Z:f48890c1-8b07-4101-8b5c-a984c6700d48" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "189" - ], - "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/admsdknet768ServiceTopology' under resource group 'admsdknet768' was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcy9hZG1zZGtuZXQ3NjhTZXJ2aWNlP2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"targetLocation\": \"Central US\",\r\n \"targetSubscriptionId\": \"53012dcb-5039-4e96-8e6c-5d913da1cdb5\"\r\n },\r\n \"location\": \"Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf407d11-7165-4e6e-8439-9313a393d31c" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "162" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:30:35 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "bf407d11-7165-4e6e-8439-9313a393d31c" - ], - "x-ms-correlation-request-id": [ - "6384c928-7de5-4d0e-a146-f911e13e2999" - ], - "x-ms-request-id": [ - "8bcf9b28-7a99-43ab-91e6-421aa9c7f80d" - ], - "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": [ - "WESTUS:20191212T003035Z:6384c928-7de5-4d0e-a146-f911e13e2999" - ], - "Content-Length": [ - "491" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"targetSubscriptionId\": \"53012dcb-5039-4e96-8e6c-5d913da1cdb5\",\r\n \"targetLocation\": \"Central US\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies/services\",\r\n \"apiVersion\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service\",\r\n \"name\": \"admsdknet768Service\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcy9hZG1zZGtuZXQ3NjhTZXJ2aWNlP2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"targetLocation\": \"Central US\",\r\n \"targetSubscriptionId\": \"1e591dc1-b014-4754-b53b-58b67bcab1cd\"\r\n },\r\n \"location\": \"Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "98e469c6-18b2-401d-8eed-554dd3880390" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "162" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:12 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "98e469c6-18b2-401d-8eed-554dd3880390" - ], - "x-ms-correlation-request-id": [ - "ce544153-096c-4e94-83e8-2e87825a2249" - ], - "x-ms-request-id": [ - "3040be1e-75d6-4eba-b7c2-199d0dba4833" - ], - "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": [ - "WESTUS:20191212T004112Z:ce544153-096c-4e94-83e8-2e87825a2249" - ], - "Content-Length": [ - "491" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"targetSubscriptionId\": \"1e591dc1-b014-4754-b53b-58b67bcab1cd\",\r\n \"targetLocation\": \"Central US\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies/services\",\r\n \"apiVersion\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service\",\r\n \"name\": \"admsdknet768Service\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcy9hZG1zZGtuZXQ3NjhTZXJ2aWNlP2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8ef0626d-656d-44ca-a4b9-87f9af5351b6" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:30:35 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "8ef0626d-656d-44ca-a4b9-87f9af5351b6" - ], - "x-ms-correlation-request-id": [ - "cec3001d-91ed-45e3-9a2a-6c32827fc29e" - ], - "x-ms-request-id": [ - "d5f952d2-514d-427a-81cb-ff7f5e6784fd" - ], - "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": [ - "WESTUS:20191212T003035Z:cec3001d-91ed-45e3-9a2a-6c32827fc29e" - ], - "Content-Length": [ - "491" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"targetSubscriptionId\": \"53012dcb-5039-4e96-8e6c-5d913da1cdb5\",\r\n \"targetLocation\": \"Central US\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies/services\",\r\n \"apiVersion\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service\",\r\n \"name\": \"admsdknet768Service\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcy9hZG1zZGtuZXQ3NjhTZXJ2aWNlP2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "fc6345b4-40d9-46aa-af6d-c34892512849" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:15 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "251e570f-43c7-430c-8d4f-a5c7e1edac5f" - ], - "x-ms-correlation-request-id": [ - "251e570f-43c7-430c-8d4f-a5c7e1edac5f" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004116Z:251e570f-43c7-430c-8d4f-a5c7e1edac5f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "218" - ], - "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/admsdknet768ServiceTopology/services/admsdknet768Service' under resource group 'admsdknet768' was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcy9hZG1zZGtuZXQ3NjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ3NjhTZXJ2aWNlVW5pdD9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet768\",\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": [ - "7403684e-ee6f-4af6-a2f3-8892bfd29c39" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "309" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:30:39 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/operationResults/b2c7394b-4b78-49f5-ab0f-cd02247ac667?api-version=2019-11-01-preview" - ], - "Retry-After": [ - "57" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/operationResults/b2c7394b-4b78-49f5-ab0f-cd02247ac667?api-version=2019-11-01-preview" - ], - "x-ms-client-request-id": [ - "7403684e-ee6f-4af6-a2f3-8892bfd29c39" - ], - "x-ms-correlation-request-id": [ - "48f29e9f-f262-44f9-b281-81cc98503306" - ], - "x-ms-request-id": [ - "b2c7394b-4b78-49f5-ab0f-cd02247ac667" - ], - "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": [ - "WESTUS:20191212T003040Z:48f29e9f-f262-44f9-b281-81cc98503306" - ], - "Content-Length": [ - "659" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet768\",\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit\",\r\n \"name\": \"admsdknet768ServiceUnit\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcy9hZG1zZGtuZXQ3NjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ3NjhTZXJ2aWNlVW5pdD9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet768\",\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": [ - "f5726a16-68af-4428-bde3-0227ea21dbd6" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "316" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:39:59 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/operationResults/1e2ff337-84df-4499-8dcb-c14946dd7fd8?api-version=2019-11-01-preview" - ], - "Retry-After": [ - "49" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/operationResults/1e2ff337-84df-4499-8dcb-c14946dd7fd8?api-version=2019-11-01-preview" - ], - "x-ms-client-request-id": [ - "f5726a16-68af-4428-bde3-0227ea21dbd6" - ], - "x-ms-correlation-request-id": [ - "37660bd2-8632-422e-aa5d-d6e023b8de8b" - ], - "x-ms-request-id": [ - "1e2ff337-84df-4499-8dcb-c14946dd7fd8" - ], - "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": [ - "WESTUS:20191212T004000Z:37660bd2-8632-422e-aa5d-d6e023b8de8b" - ], - "Content-Length": [ - "666" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet768\",\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit\",\r\n \"name\": \"admsdknet768ServiceUnit\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/operationResults/b2c7394b-4b78-49f5-ab0f-cd02247ac667?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlZ3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL29wZXJhdGlvblJlc3VsdHMvYjJjNzM5NGItNGI3OC00OWY1LWFiMGYtY2QwMjI0N2FjNjY3P2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:31:36 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit?api-version=2019-11-01-preview" - ], - "Retry-After": [ - "30" - ], - "x-ms-client-request-id": [ - "4beb9094-ae3e-4f13-b52c-ee978bd04dba" - ], - "x-ms-correlation-request-id": [ - "35a4b050-3da1-4201-81d3-d74f0edabfc3" - ], - "x-ms-request-id": [ - "e3d3aa0f-4e8b-4127-848e-a6d4d9e8beb4" - ], - "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": [ - "WESTUS:20191212T003137Z:35a4b050-3da1-4201-81d3-d74f0edabfc3" - ], - "Content-Length": [ - "106" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2019-12-12T00:30:37.394Z\",\r\n \"endTime\": \"2019-12-12T00:30:42.208Z\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcy9hZG1zZGtuZXQ3NjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ3NjhTZXJ2aWNlVW5pdD9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:31:37 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "fbff6b99-a2f9-4eee-996d-bc27bd477998" - ], - "x-ms-correlation-request-id": [ - "91f9dd0a-f527-41f3-bed7-13e0d7cce224" - ], - "x-ms-request-id": [ - "c58647a2-ec1a-422d-8cc7-0c7896c00c0a" - ], - "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": [ - "WESTUS:20191212T003138Z:91f9dd0a-f527-41f3-bed7-13e0d7cce224" - ], - "Content-Length": [ - "661" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet768\",\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit\",\r\n \"name\": \"admsdknet768ServiceUnit\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcy9hZG1zZGtuZXQ3NjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ3NjhTZXJ2aWNlVW5pdD9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ffe7bd8a-b902-4f9a-94b8-773c1a1fb299" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:31:38 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "ffe7bd8a-b902-4f9a-94b8-773c1a1fb299" - ], - "x-ms-correlation-request-id": [ - "36cfcc52-b243-4326-b623-7bb073dee1ca" - ], - "x-ms-request-id": [ - "fb8bb61a-6625-4b84-a22a-2a5422368d67" - ], - "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": [ - "WESTUS:20191212T003139Z:36cfcc52-b243-4326-b623-7bb073dee1ca" - ], - "Content-Length": [ - "661" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet768\",\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit\",\r\n \"name\": \"admsdknet768ServiceUnit\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcy9hZG1zZGtuZXQ3NjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ3NjhTZXJ2aWNlVW5pdD9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:40:48 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "78bc260f-1ccb-4926-8f78-924cfb9c85cb" - ], - "x-ms-correlation-request-id": [ - "f61f82f4-d03d-4640-963a-d201f9acd8c3" - ], - "x-ms-request-id": [ - "2ad3e81a-e0b8-460a-89b8-3d2993416dcc" - ], - "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": [ - "WESTUS:20191212T004049Z:f61f82f4-d03d-4640-963a-d201f9acd8c3" - ], - "Content-Length": [ - "668" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet768\",\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit\",\r\n \"name\": \"admsdknet768ServiceUnit\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcy9hZG1zZGtuZXQ3NjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ3NjhTZXJ2aWNlVW5pdD9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "531aabb0-15ac-4670-80d0-5aaef2510767" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:09 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "d56873f5-9124-4b1d-8ab3-b61bd57798b0" - ], - "x-ms-correlation-request-id": [ - "d56873f5-9124-4b1d-8ab3-b61bd57798b0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004110Z:d56873f5-9124-4b1d-8ab3-b61bd57798b0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "255" - ], - "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/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit' under resource group 'admsdknet768' was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768InvalidServiceUnit?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcy9hZG1zZGtuZXQ3NjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ3NjhJbnZhbGlkU2VydmljZVVuaXQ/YXBpLXZlcnNpb249MjAxOS0xMS0wMS1wcmV2aWV3", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet768\",\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": [ - "5169ca1d-6062-47fc-97bc-4ddeaaf01252" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "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, 12 Dec 2019 00:31:43 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/operationResults/fdf977ab-9596-4748-a2f2-f6b41c8b9461?api-version=2019-11-01-preview" - ], - "Retry-After": [ - "46" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/operationResults/fdf977ab-9596-4748-a2f2-f6b41c8b9461?api-version=2019-11-01-preview" - ], - "x-ms-client-request-id": [ - "5169ca1d-6062-47fc-97bc-4ddeaaf01252" - ], - "x-ms-correlation-request-id": [ - "fbde0167-d06d-407f-b83e-7b1f2bfe2896" - ], - "x-ms-request-id": [ - "fdf977ab-9596-4748-a2f2-f6b41c8b9461" - ], - "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": [ - "WESTUS:20191212T003143Z:fbde0167-d06d-407f-b83e-7b1f2bfe2896" - ], - "Content-Length": [ - "681" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet768\",\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768InvalidServiceUnit\",\r\n \"name\": \"admsdknet768InvalidServiceUnit\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/operationResults/fdf977ab-9596-4748-a2f2-f6b41c8b9461?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlZ3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL29wZXJhdGlvblJlc3VsdHMvZmRmOTc3YWItOTU5Ni00NzQ4LWEyZjItZjZiNDFjOGI5NDYxP2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:32:30 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768InvalidServiceUnit?api-version=2019-11-01-preview" - ], - "Retry-After": [ - "30" - ], - "x-ms-client-request-id": [ - "45f049f1-ff01-493c-82de-db648f7e0ff0" - ], - "x-ms-correlation-request-id": [ - "acb3f34f-9eba-4b7b-9d31-fec5daaddf01" - ], - "x-ms-request-id": [ - "62213005-f931-493e-85b0-f75068e46bab" - ], - "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": [ - "WESTUS:20191212T003230Z:acb3f34f-9eba-4b7b-9d31-fec5daaddf01" - ], - "Content-Length": [ - "106" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2019-12-12T00:31:41.556Z\",\r\n \"endTime\": \"2019-12-12T00:31:45.949Z\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768InvalidServiceUnit?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcy9hZG1zZGtuZXQ3NjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ3NjhJbnZhbGlkU2VydmljZVVuaXQ/YXBpLXZlcnNpb249MjAxOS0xMS0wMS1wcmV2aWV3", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:32:30 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "adc7ab18-dcc0-4335-a3dc-27772764131d" - ], - "x-ms-correlation-request-id": [ - "77b04aed-3e4c-4294-858c-b8c1edc5c11a" - ], - "x-ms-request-id": [ - "45670a75-4e23-464b-ad26-c24aa3ace5a0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "X-Frame-Options": [ - "DENY" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T003230Z:77b04aed-3e4c-4294-858c-b8c1edc5c11a" - ], - "Content-Length": [ - "683" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet768\",\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768InvalidServiceUnit\",\r\n \"name\": \"admsdknet768InvalidServiceUnit\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768WaitStep?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3N0ZXBzL2FkbXNka25ldDc2OFdhaXRTdGVwP2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "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": [ - "57945a51-f40e-4e68-b04a-5074c10726b5" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "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, 12 Dec 2019 00:32:33 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "57945a51-f40e-4e68-b04a-5074c10726b5" - ], - "x-ms-correlation-request-id": [ - "56d46f8b-340c-4d4d-87cc-0032a5fe0750" - ], - "x-ms-request-id": [ - "f872c20a-736b-4b14-9ae8-1234f3131109" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "X-Frame-Options": [ - "DENY" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1194" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T003233Z:56d46f8b-340c-4d4d-87cc-0032a5fe0750" - ], - "Content-Length": [ - "382" - ], - "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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768WaitStep\",\r\n \"name\": \"admsdknet768WaitStep\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768WaitStep?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3N0ZXBzL2FkbXNka25ldDc2OFdhaXRTdGVwP2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "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": [ - "38bbf9e0-3243-44d8-b4a1-b1379902c973" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "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, 12 Dec 2019 00:39:51 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "38bbf9e0-3243-44d8-b4a1-b1379902c973" - ], - "x-ms-correlation-request-id": [ - "b03257c7-37b8-480c-8d0e-b3e82fb4ca22" - ], - "x-ms-request-id": [ - "f4255067-b4bd-4dee-828e-68adae9d2aa6" - ], - "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": [ - "WESTUS:20191212T003952Z:b03257c7-37b8-480c-8d0e-b3e82fb4ca22" - ], - "Content-Length": [ - "383" - ], - "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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768WaitStep\",\r\n \"name\": \"admsdknet768WaitStep\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768WaitStep?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3N0ZXBzL2FkbXNka25ldDc2OFdhaXRTdGVwP2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1a3830e5-bd24-42d4-a5eb-e14dd80acc99" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:32:33 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "1a3830e5-bd24-42d4-a5eb-e14dd80acc99" - ], - "x-ms-correlation-request-id": [ - "fd5be1a4-37e6-40f3-ad97-3bafd4dae12d" - ], - "x-ms-request-id": [ - "ae3bd984-8663-4140-9da0-553f13be731c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "X-Frame-Options": [ - "DENY" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T003233Z:fd5be1a4-37e6-40f3-ad97-3bafd4dae12d" - ], - "Content-Length": [ - "382" - ], - "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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768WaitStep\",\r\n \"name\": \"admsdknet768WaitStep\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768WaitStep?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3N0ZXBzL2FkbXNka25ldDc2OFdhaXRTdGVwP2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "28f6c14d-778a-448b-a750-18583f94d490" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:39:57 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "4b05462b-30f9-4bdb-a2e5-0daf7efbcd48" - ], - "x-ms-correlation-request-id": [ - "4b05462b-30f9-4bdb-a2e5-0daf7efbcd48" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T003958Z:4b05462b-30f9-4bdb-a2e5-0daf7efbcd48" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "170" - ], - "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/admsdknet768WaitStep' under resource group 'admsdknet768' 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": [ - "be9e628d-019b-4a9f-9bb7-bb1df4c6b5ae" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:32:33 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "52ebe3c1-bd98-4477-bf1a-211064a2eb5a" - ], - "x-ms-correlation-request-id": [ - "52ebe3c1-bd98-4477-bf1a-211064a2eb5a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T003234Z:52ebe3c1-bd98-4477-bf1a-211064a2eb5a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "2005" - ], - "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 \"UAE North\",\r\n \"Australia Central\",\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 \"Germany West Central\",\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\": \"SupportsExtension\"\r\n },\r\n {\r\n \"resourceType\": \"userAssignedIdentities\",\r\n \"locations\": [\r\n \"South Africa North\",\r\n \"South Africa West\",\r\n \"UAE North\",\r\n \"Australia Central\",\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 \"Germany West Central\",\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 \"UAE North\",\r\n \"Australia Central\",\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 \"Germany West Central\",\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/admsdknet768/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet768Identity?api-version=2015-08-31-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0Lk1hbmFnZWRJZGVudGl0eS91c2VyQXNzaWduZWRJZGVudGl0aWVzL2FkbXNka25ldDc2OElkZW50aXR5P2FwaS12ZXJzaW9uPTIwMTUtMDgtMzEtcHJldmlldw==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"South Africa North\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1cdaadb5-84c6-48a2-96ce-30df06b7eccc" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "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, 12 Dec 2019 00:32:38 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet768Identity" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "f309c0b8-0fac-460e-bb22-bb70200f2c4e" - ], - "x-ms-correlation-request-id": [ - "f309c0b8-0fac-460e-bb22-bb70200f2c4e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T003239Z:f309c0b8-0fac-460e-bb22-bb70200f2c4e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "830" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet768Identity\",\r\n \"name\": \"admsdknet768Identity\",\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\": \"3d1232e3-be81-4a86-96ae-87a56ac82729\",\r\n \"clientId\": \"c9da4cdd-bac9-491a-8b2a-2b05844b040a\",\r\n \"clientSecretUrl\": \"https://control-southafricanorth.identity.azure.net/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet768Identity/credentials?tid=72f988bf-86f1-41af-91ab-2d7cd011db47&oid=3d1232e3-be81-4a86-96ae-87a56ac82729&aid=c9da4cdd-bac9-491a-8b2a-2b05844b040a\"\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": [ - "2324fdb5-ac87-4c0c-ac30-e9032e3aabe4" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/2.11.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:34:39 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Set-Cookie": [ - "x-ms-gateway-slice=Production; path=/; SameSite=None; secure; HttpOnly" - ], - "x-ms-request-charge": [ - "1" - ], - "x-ms-request-id": [ - "3c446bab-f96a-4444-b363-f7bcbd97a239" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "26237156-2842-4006-b026-5632249c88bd" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T003439Z:26237156-2842-4006-b026-5632249c88bd" - ], - "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/4095ae2c-8ed9-4974-93a8-9b07c070b24c?api-version=2018-09-01-preview", - "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzUzMDEyZGNiLTUwMzktNGU5Ni04ZTZjLTVkOTEzZGExY2RiNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZUFzc2lnbm1lbnRzLzQwOTVhZTJjLThlZDktNDk3NC05M2E4LTliMDdjMDcwYjI0Yz9hcGktdmVyc2lvbj0yMDE4LTA5LTAxLXByZXZpZXc=", - "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\": \"3d1232e3-be81-4a86-96ae-87a56ac82729\",\r\n \"canDelegate\": false\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "737ae79a-dce8-448d-94c7-e70f76f7afda" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "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, 12 Dec 2019 00:34:43 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Set-Cookie": [ - "x-ms-gateway-slice=Production; path=/; secure; HttpOnly" - ], - "x-ms-request-charge": [ - "2" - ], - "x-ms-request-id": [ - "2a58ce33-0720-4b9e-9f97-bfa348e41263" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "c8ab951d-c2e3-4a46-ba3e-28d2a96ed082" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T003443Z:c8ab951d-c2e3-4a46-ba3e-28d2a96ed082" - ], - "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\": \"3d1232e3-be81-4a86-96ae-87a56ac82729\",\r\n \"principalType\": \"ServicePrincipal\",\r\n \"scope\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5\",\r\n \"createdOn\": \"2019-12-12T00:34:39.7353778Z\",\r\n \"updatedOn\": \"2019-12-12T00:34:39.7353778Z\",\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/4095ae2c-8ed9-4974-93a8-9b07c070b24c\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"4095ae2c-8ed9-4974-93a8-9b07c070b24c\"\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "//subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.Authorization/roleAssignments/4095ae2c-8ed9-4974-93a8-9b07c070b24c?api-version=2018-09-01-preview", - "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzUzMDEyZGNiLTUwMzktNGU5Ni04ZTZjLTVkOTEzZGExY2RiNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZUFzc2lnbm1lbnRzLzQwOTVhZTJjLThlZDktNDk3NC05M2E4LTliMDdjMDcwYjI0Yz9hcGktdmVyc2lvbj0yMDE4LTA5LTAxLXByZXZpZXc=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "cbe5bf4a-8497-474b-a8fe-e2c29067c087" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/2.11.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:35:42 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Set-Cookie": [ - "x-ms-gateway-slice=Production; path=/; secure; HttpOnly" - ], - "x-ms-request-charge": [ - "1" - ], - "x-ms-request-id": [ - "38066ce9-5283-4ead-873d-d394139c3c0b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "8a2d7c40-4b66-45e1-b20e-835db1f91e9e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T003543Z:8a2d7c40-4b66-45e1-b20e-835db1f91e9e" - ], - "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\": \"3d1232e3-be81-4a86-96ae-87a56ac82729\",\r\n \"principalType\": \"ServicePrincipal\",\r\n \"scope\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5\",\r\n \"createdOn\": \"2019-12-12T00:34:40.7789007Z\",\r\n \"updatedOn\": \"2019-12-12T00:34:40.7789007Z\",\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/4095ae2c-8ed9-4974-93a8-9b07c070b24c\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"4095ae2c-8ed9-4974-93a8-9b07c070b24c\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768Rollout?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3JvbGxvdXRzL2FkbXNka25ldDc2OFJvbGxvdXQ/YXBpLXZlcnNpb249MjAxOS0xMS0wMS1wcmV2aWV3", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"identityIds\": [\r\n \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet768Identity\"\r\n ]\r\n },\r\n \"properties\": {\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology\",\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/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768WaitStep\"\r\n }\r\n ],\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit\"\r\n }\r\n ]\r\n },\r\n \"location\": \"Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "df298f8b-2a8a-41be-a05d-d8368bc4211f" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "1310" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:35:50 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/operationResults/a197ad1b-3df6-4fe8-a1ea-c66baaaf52b0?api-version=2019-11-01-preview" - ], - "Retry-After": [ - "40" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/operationResults/a197ad1b-3df6-4fe8-a1ea-c66baaaf52b0?api-version=2019-11-01-preview" - ], - "x-ms-client-request-id": [ - "df298f8b-2a8a-41be-a05d-d8368bc4211f" - ], - "x-ms-correlation-request-id": [ - "a4d2376d-d871-4e0f-836b-5e8d2cc441a1" - ], - "x-ms-request-id": [ - "a197ad1b-3df6-4fe8-a1ea-c66baaaf52b0" - ], - "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": [ - "WESTUS:20191212T003551Z:a4d2376d-d871-4e0f-836b-5e8d2cc441a1" - ], - "Content-Length": [ - "1468" - ], - "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/admsdknet768/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet768Identity\"\r\n ]\r\n },\r\n \"properties\": {\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"First_Region\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit\",\r\n \"preDeploymentSteps\": [\r\n {\r\n \"stepId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768WaitStep\"\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768Rollout\",\r\n \"name\": \"admsdknet768Rollout\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/operationResults/a197ad1b-3df6-4fe8-a1ea-c66baaaf52b0?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlZ3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL29wZXJhdGlvblJlc3VsdHMvYTE5N2FkMWItM2RmNi00ZmU4LWExZWEtYzY2YmFhYWY1MmIwP2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:36:31 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768Rollout?api-version=2019-11-01-preview" - ], - "Retry-After": [ - "30" - ], - "x-ms-client-request-id": [ - "6d3b8721-c371-435e-9cfd-608d8c424843" - ], - "x-ms-correlation-request-id": [ - "a3743c10-ef22-43c0-8911-f099018aaca1" - ], - "x-ms-request-id": [ - "49067b09-a109-40ae-a141-cfad9791e7ec" - ], - "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": [ - "WESTUS:20191212T003631Z:a3743c10-ef22-43c0-8911-f099018aaca1" - ], - "Content-Length": [ - "106" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2019-12-12T00:35:48.726Z\",\r\n \"endTime\": \"2019-12-12T00:35:53.243Z\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768Rollout?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3JvbGxvdXRzL2FkbXNka25ldDc2OFJvbGxvdXQ/YXBpLXZlcnNpb249MjAxOS0xMS0wMS1wcmV2aWV3", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:36:32 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768Rollout?api-version=2019-11-01-preview" - ], - "Retry-After": [ - "120" - ], - "x-ms-client-request-id": [ - "a192d06f-0b83-4a85-a8f9-199bc4cf8973" - ], - "x-ms-correlation-request-id": [ - "c8a00397-1762-4d09-be94-99df36930aac" - ], - "x-ms-request-id": [ - "3c779042-6152-4040-b8ac-989cdf941d12" - ], - "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": [ - "WESTUS:20191212T003632Z:c8a00397-1762-4d09-be94-99df36930aac" - ], - "Content-Length": [ - "2296" - ], - "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/admsdknet768/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet768Identity\"\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-12-12T00:35:52.571Z\",\r\n \"lastUpdatedTime\": \"2019-12-12T00:35:52.571Z\"\r\n },\r\n \"services\": [\r\n {\r\n \"name\": \"admsdknet768Service\",\r\n \"targetSubscriptionId\": \"53012dcb-5039-4e96-8e6c-5d913da1cdb5\",\r\n \"targetLocation\": \"Central US\",\r\n \"serviceUnits\": [\r\n {\r\n \"name\": \"admsdknet768ServiceUnit\",\r\n \"targetResourceGroup\": \"admsdknet768Service\",\r\n \"artifacts\": {},\r\n \"steps\": [\r\n {\r\n \"name\": \"Wait/admsdknet768WaitStep.PreDeploy\",\r\n \"stepGroup\": \"First_Region\",\r\n \"status\": \"Running\",\r\n \"operationInfo\": {\r\n \"deploymentName\": \"\",\r\n \"startTime\": \"2019-12-12T00:35:58.846Z\",\r\n \"lastUpdatedTime\": \"2019-12-12T00:35:58.846Z\"\r\n },\r\n \"resourceOperations\": [],\r\n \"messages\": [\r\n {\r\n \"timestamp\": \"2019-12-12T00:35:58.5966939Z\",\r\n \"message\": \"Wait ending at '12/12/2019 00:40:58 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/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"First_Region\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit\",\r\n \"preDeploymentSteps\": [\r\n {\r\n \"stepId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768WaitStep\"\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768Rollout\",\r\n \"name\": \"admsdknet768Rollout\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768Rollout?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3JvbGxvdXRzL2FkbXNka25ldDc2OFJvbGxvdXQ/YXBpLXZlcnNpb249MjAxOS0xMS0wMS1wcmV2aWV3", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "cea1e0e9-19ee-4449-9b5b-43e2b60ab226" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:37:42 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768Rollout?api-version=2019-11-01-preview" - ], - "Retry-After": [ - "120" - ], - "x-ms-client-request-id": [ - "cea1e0e9-19ee-4449-9b5b-43e2b60ab226" - ], - "x-ms-correlation-request-id": [ - "1d18c684-c714-4f7c-ab45-f907ace58004" - ], - "x-ms-request-id": [ - "3bedda41-4397-4515-b7a4-8d00fbb70b75" - ], - "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": [ - "WESTUS:20191212T003742Z:1d18c684-c714-4f7c-ab45-f907ace58004" - ], - "Content-Length": [ - "2296" - ], - "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/admsdknet768/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet768Identity\"\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-12-12T00:35:52.571Z\",\r\n \"lastUpdatedTime\": \"2019-12-12T00:35:52.571Z\"\r\n },\r\n \"services\": [\r\n {\r\n \"name\": \"admsdknet768Service\",\r\n \"targetSubscriptionId\": \"53012dcb-5039-4e96-8e6c-5d913da1cdb5\",\r\n \"targetLocation\": \"Central US\",\r\n \"serviceUnits\": [\r\n {\r\n \"name\": \"admsdknet768ServiceUnit\",\r\n \"targetResourceGroup\": \"admsdknet768Service\",\r\n \"artifacts\": {},\r\n \"steps\": [\r\n {\r\n \"name\": \"Wait/admsdknet768WaitStep.PreDeploy\",\r\n \"stepGroup\": \"First_Region\",\r\n \"status\": \"Running\",\r\n \"operationInfo\": {\r\n \"deploymentName\": \"\",\r\n \"startTime\": \"2019-12-12T00:35:58.846Z\",\r\n \"lastUpdatedTime\": \"2019-12-12T00:35:58.846Z\"\r\n },\r\n \"resourceOperations\": [],\r\n \"messages\": [\r\n {\r\n \"timestamp\": \"2019-12-12T00:35:58.5966939Z\",\r\n \"message\": \"Wait ending at '12/12/2019 00:40:58 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/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"First_Region\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit\",\r\n \"preDeploymentSteps\": [\r\n {\r\n \"stepId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768WaitStep\"\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768Rollout\",\r\n \"name\": \"admsdknet768Rollout\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768Rollout?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3JvbGxvdXRzL2FkbXNka25ldDc2OFJvbGxvdXQ/YXBpLXZlcnNpb249MjAxOS0xMS0wMS1wcmV2aWV3", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0987d39b-2e30-422f-9fa5-d79c7695d827" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:38:45 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768Rollout?api-version=2019-11-01-preview" - ], - "Retry-After": [ - "120" - ], - "x-ms-client-request-id": [ - "0987d39b-2e30-422f-9fa5-d79c7695d827" - ], - "x-ms-correlation-request-id": [ - "262d84ef-6886-4829-823d-3c9ac09df2f4" - ], - "x-ms-request-id": [ - "c6484de9-de42-4996-b963-c9c333cd0d76" - ], - "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": [ - "WESTUS:20191212T003846Z:262d84ef-6886-4829-823d-3c9ac09df2f4" - ], - "Content-Length": [ - "2246" - ], - "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/admsdknet768/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet768Identity\"\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-12-12T00:35:52.571Z\",\r\n \"endTime\": \"2019-12-12T00:38:02.905Z\",\r\n \"lastUpdatedTime\": \"2019-12-12T00:38:02.905Z\"\r\n },\r\n \"services\": [\r\n {\r\n \"name\": \"admsdknet768Service\",\r\n \"targetSubscriptionId\": \"53012dcb-5039-4e96-8e6c-5d913da1cdb5\",\r\n \"targetLocation\": \"Central US\",\r\n \"serviceUnits\": [\r\n {\r\n \"name\": \"admsdknet768ServiceUnit\",\r\n \"targetResourceGroup\": \"admsdknet768Service\",\r\n \"artifacts\": {},\r\n \"steps\": [\r\n {\r\n \"name\": \"Wait/admsdknet768WaitStep.PreDeploy\",\r\n \"stepGroup\": \"First_Region\",\r\n \"status\": \"Canceled\",\r\n \"operationInfo\": {\r\n \"deploymentName\": \"\",\r\n \"startTime\": \"2019-12-12T00:35:58.846Z\",\r\n \"endTime\": \"2019-12-12T00:37:59.946Z\",\r\n \"lastUpdatedTime\": \"2019-12-12T00:37:59.946Z\"\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/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"First_Region\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit\",\r\n \"preDeploymentSteps\": [\r\n {\r\n \"stepId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768WaitStep\"\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768Rollout\",\r\n \"name\": \"admsdknet768Rollout\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768Rollout?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3JvbGxvdXRzL2FkbXNka25ldDc2OFJvbGxvdXQ/YXBpLXZlcnNpb249MjAxOS0xMS0wMS1wcmV2aWV3", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "03f2cb70-614a-48cd-99fb-c7c095fa0173" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:38:49 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "e1941ee1-d7f7-49c7-8a71-e55e3b76aca2" - ], - "x-ms-correlation-request-id": [ - "e1941ee1-d7f7-49c7-8a71-e55e3b76aca2" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T003849Z:e1941ee1-d7f7-49c7-8a71-e55e3b76aca2" - ], - "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/rollouts/admsdknet768Rollout' under resource group 'admsdknet768' was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768FailureRollout?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3JvbGxvdXRzL2FkbXNka25ldDc2OEZhaWx1cmVSb2xsb3V0P2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"identityIds\": [\r\n \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet768Identity\"\r\n ]\r\n },\r\n \"properties\": {\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"FirstRegion\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768InvalidServiceUnit\"\r\n }\r\n ]\r\n },\r\n \"location\": \"Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6279b345-59a8-4376-bca6-0d398d120e1a" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "1075" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:36:37 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/operationResults/a0130063-e1ee-4e2c-98f6-215e8a21e96c?api-version=2019-11-01-preview" - ], - "Retry-After": [ - "43" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/operationResults/a0130063-e1ee-4e2c-98f6-215e8a21e96c?api-version=2019-11-01-preview" - ], - "x-ms-client-request-id": [ - "6279b345-59a8-4376-bca6-0d398d120e1a" - ], - "x-ms-correlation-request-id": [ - "2bc0e5a3-1c09-4c6e-9c96-e05626877607" - ], - "x-ms-request-id": [ - "a0130063-e1ee-4e2c-98f6-215e8a21e96c" - ], - "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": [ - "WESTUS:20191212T003637Z:2bc0e5a3-1c09-4c6e-9c96-e05626877607" - ], - "Content-Length": [ - "1331" - ], - "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/admsdknet768/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet768Identity\"\r\n ]\r\n },\r\n \"properties\": {\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"FirstRegion\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768InvalidServiceUnit\",\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768FailureRollout\",\r\n \"name\": \"admsdknet768FailureRollout\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/operationResults/a0130063-e1ee-4e2c-98f6-215e8a21e96c?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlZ3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL29wZXJhdGlvblJlc3VsdHMvYTAxMzAwNjMtZTFlZS00ZTJjLTk4ZjYtMjE1ZThhMjFlOTZjP2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:37:21 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768FailureRollout?api-version=2019-11-01-preview" - ], - "Retry-After": [ - "30" - ], - "x-ms-client-request-id": [ - "20f11148-773b-43ec-a1ca-fdf52a105aeb" - ], - "x-ms-correlation-request-id": [ - "ba7be44b-f028-4c84-91bc-8927cd472aa9" - ], - "x-ms-request-id": [ - "7db78ec8-8fc5-4e55-a1f9-2b7fe8d6aa4d" - ], - "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": [ - "WESTUS:20191212T003721Z:ba7be44b-f028-4c84-91bc-8927cd472aa9" - ], - "Content-Length": [ - "106" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2019-12-12T00:36:35.386Z\",\r\n \"endTime\": \"2019-12-12T00:36:39.685Z\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768FailureRollout?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3JvbGxvdXRzL2FkbXNka25ldDc2OEZhaWx1cmVSb2xsb3V0P2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:37:41 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768FailureRollout?api-version=2019-11-01-preview" - ], - "Retry-After": [ - "120" - ], - "x-ms-client-request-id": [ - "90e8c9a7-c945-44c6-98e0-bcdffc110e22" - ], - "x-ms-correlation-request-id": [ - "25442fef-3d9f-4d49-a044-fcdcff469c13" - ], - "x-ms-request-id": [ - "1a779b77-403d-4d94-a62c-aceaa241bde8" - ], - "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": [ - "WESTUS:20191212T003742Z:25442fef-3d9f-4d49-a044-fcdcff469c13" - ], - "Content-Length": [ - "2892" - ], - "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/admsdknet768/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet768Identity\"\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-12-12T00:36:39.31Z\",\r\n \"endTime\": \"2019-12-12T00:36:46.308Z\",\r\n \"lastUpdatedTime\": \"2019-12-12T00:36:46.308Z\",\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\": \"admsdknet768Service\",\r\n \"targetSubscriptionId\": \"53012dcb-5039-4e96-8e6c-5d913da1cdb5\",\r\n \"targetLocation\": \"Central US\",\r\n \"serviceUnits\": [\r\n {\r\n \"name\": \"admsdknet768InvalidServiceUnit\",\r\n \"targetResourceGroup\": \"admsdknet768\",\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\": \"9345D3616F184368BB3B9C4C91534E9D0admsdknet768InvalidServiceUnit\",\r\n \"startTime\": \"2019-12-12T00:36:45.676Z\",\r\n \"endTime\": \"2019-12-12T00:36:45.676Z\",\r\n \"lastUpdatedTime\": \"2019-12-12T00:36:45.676Z\",\r\n \"error\": {\r\n \"code\": \"ActionExecutionFailed\",\r\n \"message\": \"Error: Code=InvalidTemplate; Message=Deployment template validation failed: 'The template resource '(Invalid_Storage.Account/Name)' for type 'Microsoft.WindowsAzure.ResourceStack.Frontdoor.Common.Entities.TemplateGenericProperty`1[System.String]' at line '28' and column '55' has incorrect segment lengths. A nested resource type must have identical number of segments as its resource name. A root resource type must have segment length one greater than its resource name. Please see https://aka.ms/arm-template/#resources for usage details.'.\\r\\n \"\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/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"FirstRegion\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768InvalidServiceUnit\",\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768FailureRollout\",\r\n \"name\": \"admsdknet768FailureRollout\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768FailureRollout?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3JvbGxvdXRzL2FkbXNka25ldDc2OEZhaWx1cmVSb2xsb3V0P2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5773337a-e556-4fbf-80c5-b190ed1109f1" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:39:49 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768FailureRollout?api-version=2019-11-01-preview" - ], - "Retry-After": [ - "120" - ], - "x-ms-client-request-id": [ - "5773337a-e556-4fbf-80c5-b190ed1109f1" - ], - "x-ms-correlation-request-id": [ - "b46c9159-3d6f-4284-a629-c812932ac349" - ], - "x-ms-request-id": [ - "4983aa70-730c-4566-beff-90951ba313ff" - ], - "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": [ - "WESTUS:20191212T003950Z:b46c9159-3d6f-4284-a629-c812932ac349" - ], - "Content-Length": [ - "2892" - ], - "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/admsdknet768/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet768Identity\"\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-12-12T00:36:39.31Z\",\r\n \"endTime\": \"2019-12-12T00:36:46.308Z\",\r\n \"lastUpdatedTime\": \"2019-12-12T00:36:46.308Z\",\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\": \"admsdknet768Service\",\r\n \"targetSubscriptionId\": \"53012dcb-5039-4e96-8e6c-5d913da1cdb5\",\r\n \"targetLocation\": \"Central US\",\r\n \"serviceUnits\": [\r\n {\r\n \"name\": \"admsdknet768InvalidServiceUnit\",\r\n \"targetResourceGroup\": \"admsdknet768\",\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\": \"9345D3616F184368BB3B9C4C91534E9D0admsdknet768InvalidServiceUnit\",\r\n \"startTime\": \"2019-12-12T00:36:45.676Z\",\r\n \"endTime\": \"2019-12-12T00:36:45.676Z\",\r\n \"lastUpdatedTime\": \"2019-12-12T00:36:45.676Z\",\r\n \"error\": {\r\n \"code\": \"ActionExecutionFailed\",\r\n \"message\": \"Error: Code=InvalidTemplate; Message=Deployment template validation failed: 'The template resource '(Invalid_Storage.Account/Name)' for type 'Microsoft.WindowsAzure.ResourceStack.Frontdoor.Common.Entities.TemplateGenericProperty`1[System.String]' at line '28' and column '55' has incorrect segment lengths. A nested resource type must have identical number of segments as its resource name. A root resource type must have segment length one greater than its resource name. Please see https://aka.ms/arm-template/#resources for usage details.'.\\r\\n \"\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/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"FirstRegion\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768InvalidServiceUnit\",\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768FailureRollout\",\r\n \"name\": \"admsdknet768FailureRollout\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768Rollout/cancel?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3JvbGxvdXRzL2FkbXNka25ldDc2OFJvbGxvdXQvY2FuY2VsP2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a128c1e5-84d3-4e94-b666-1c8936c1e98a" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:37:44 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768Rollout?api-version=2019-11-01-preview" - ], - "x-ms-client-request-id": [ - "a128c1e5-84d3-4e94-b666-1c8936c1e98a" - ], - "x-ms-correlation-request-id": [ - "698dc311-43c4-4c01-8f0f-490095b696df" - ], - "x-ms-request-id": [ - "cefbaf82-5f99-453c-a60c-a6f26532fc78" - ], - "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": [ - "WESTUS:20191212T003744Z:698dc311-43c4-4c01-8f0f-490095b696df" - ], - "Content-Length": [ - "1639" - ], - "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/admsdknet768/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet768Identity\"\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-12-12T00:35:52.571Z\",\r\n \"lastUpdatedTime\": \"2019-12-12T00:35:52.571Z\"\r\n },\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"First_Region\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit\",\r\n \"preDeploymentSteps\": [\r\n {\r\n \"stepId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768WaitStep\"\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768Rollout\",\r\n \"name\": \"admsdknet768Rollout\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3JvbGxvdXRzP2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a22fb9a8-f203-4860-9240-3f66d7c80268" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:38:46 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "a22fb9a8-f203-4860-9240-3f66d7c80268" - ], - "x-ms-correlation-request-id": [ - "1e90c316-65b2-409c-93bc-769d2063d9a8" - ], - "x-ms-request-id": [ - "b57f46cc-2f44-4a11-9d4c-1d0718ab7b83" - ], - "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": [ - "WESTUS:20191212T003847Z:1e90c316-65b2-409c-93bc-769d2063d9a8" - ], - "Content-Length": [ - "3335" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "[\r\n {\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"identityIds\": [\r\n \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet768Identity\"\r\n ]\r\n },\r\n \"properties\": {\r\n \"status\": \"Canceled\",\r\n \"operationInfo\": {\r\n \"retryAttempt\": 0,\r\n \"skipSucceededOnRetry\": false,\r\n \"startTime\": \"2019-12-12T00:35:52.571Z\",\r\n \"endTime\": \"2019-12-12T00:38:02.905Z\",\r\n \"lastUpdatedTime\": \"2019-12-12T00:38:02.905Z\"\r\n },\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"First_Region\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit\",\r\n \"preDeploymentSteps\": [\r\n {\r\n \"stepId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768WaitStep\"\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768Rollout\",\r\n \"name\": \"admsdknet768Rollout\",\r\n \"location\": \"Central US\"\r\n },\r\n {\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"identityIds\": [\r\n \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet768Identity\"\r\n ]\r\n },\r\n \"properties\": {\r\n \"status\": \"Failed\",\r\n \"operationInfo\": {\r\n \"retryAttempt\": 0,\r\n \"skipSucceededOnRetry\": false,\r\n \"startTime\": \"2019-12-12T00:36:39.31Z\",\r\n \"endTime\": \"2019-12-12T00:36:46.308Z\",\r\n \"lastUpdatedTime\": \"2019-12-12T00:36:46.308Z\",\r\n \"error\": {\r\n \"message\": \"Rollout failed. See individual resource's 'StatusMessage' property for specific error information. \"\r\n }\r\n },\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"FirstRegion\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768InvalidServiceUnit\",\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768FailureRollout\",\r\n \"name\": \"admsdknet768FailureRollout\",\r\n \"location\": \"Central US\"\r\n }\r\n]", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768Rollout?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3JvbGxvdXRzL2FkbXNka25ldDc2OFJvbGxvdXQ/YXBpLXZlcnNpb249MjAxOS0xMS0wMS1wcmV2aWV3", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "114e23c7-53c0-4c10-91da-8564e9fa7a26" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:38:49 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "114e23c7-53c0-4c10-91da-8564e9fa7a26" - ], - "x-ms-correlation-request-id": [ - "bd2db6be-3980-4861-b83f-15b3a191c425" - ], - "x-ms-request-id": [ - "f732a6ff-59b5-497d-ba87-82bd73104e0f" - ], - "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": [ - "WESTUS:20191212T003849Z:bd2db6be-3980-4861-b83f-15b3a191c425" - ], - "Content-Length": [ - "4" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "null", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768FailureRollout/restart?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3JvbGxvdXRzL2FkbXNka25ldDc2OEZhaWx1cmVSb2xsb3V0L3Jlc3RhcnQ/YXBpLXZlcnNpb249MjAxOS0xMS0wMS1wcmV2aWV3", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1af84eb1-5593-47d0-a7b8-bda5cba90777" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:39:50 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768FailureRollout?api-version=2019-11-01-preview" - ], - "Retry-After": [ - "60" - ], - "x-ms-client-request-id": [ - "1af84eb1-5593-47d0-a7b8-bda5cba90777" - ], - "x-ms-correlation-request-id": [ - "bdd1e962-450b-4367-a29e-af3648101b20" - ], - "x-ms-request-id": [ - "4712f3fd-ca8c-4bff-a7b9-360ed77be4e3" - ], - "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": [ - "WESTUS:20191212T003951Z:bdd1e962-450b-4367-a29e-af3648101b20" - ], - "Content-Length": [ - "1523" - ], - "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/admsdknet768/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet768Identity\"\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-12-12T00:39:50.713Z\",\r\n \"lastUpdatedTime\": \"2019-12-12T00:39:50.713Z\"\r\n },\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"FirstRegion\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768InvalidServiceUnit\",\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/rollouts/admsdknet768FailureRollout\",\r\n \"name\": \"admsdknet768FailureRollout\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768HealthCheckStep?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3N0ZXBzL2FkbXNka25ldDc2OEhlYWx0aENoZWNrU3RlcD9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"stepType\": \"HealthCheck\",\r\n \"attributes\": {\r\n \"type\": \"REST\",\r\n \"properties\": {\r\n \"healthChecks\": [\r\n {\r\n \"name\": \"webAppHealthCheck\",\r\n \"request\": {\r\n \"method\": \"GET\",\r\n \"uri\": \"https://clientvalidations.deploymentmanager.net/healthstatus\",\r\n \"authentication\": {\r\n \"type\": \"ApiKey\",\r\n \"name\": \"code\",\r\n \"in\": \"Header\",\r\n \"value\": \"AuthValue\"\r\n }\r\n },\r\n \"response\": {\r\n \"successStatusCodes\": [\r\n \"200\",\r\n \"204\"\r\n ],\r\n \"regex\": {\r\n \"matches\": [\r\n \"Contoso-Service-EndToEnd\",\r\n \"(?i)\\\"health_status\\\":((.|\\n)*)\\\"(green|yellow)\\\"\",\r\n \"(?mi)^(\\\"application_host\\\": 94781052)$\"\r\n ],\r\n \"matchQuantifier\": \"All\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"webBackEndHealthCheck\",\r\n \"request\": {\r\n \"method\": \"GET\",\r\n \"uri\": \"https://clientvalidations.deploymentmanager.net/healthstatus\",\r\n \"authentication\": {\r\n \"type\": \"RolloutIdentity\"\r\n }\r\n },\r\n \"response\": {\r\n \"successStatusCodes\": [\r\n \"200\",\r\n \"204\"\r\n ],\r\n \"regex\": {\r\n \"matches\": [\r\n \"Contoso-Service-Backend\",\r\n \"(?i)\\\"health_status\\\":((.|\\n)*)\\\"(green|yellow)\\\"\",\r\n \"(?mi)^(\\\"application_host\\\": 94781055)$\"\r\n ],\r\n \"matchQuantifier\": \"All\"\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"waitDuration\": \"PT10M\",\r\n \"maxElasticDuration\": \"PT15M\",\r\n \"healthyStateDuration\": \"PT30M\"\r\n }\r\n },\r\n \"location\": \"Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2b6ce836-3a0c-435a-a192-4da7d64cb263" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "1988" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:39:54 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "2b6ce836-3a0c-435a-a192-4da7d64cb263" - ], - "x-ms-correlation-request-id": [ - "bc3a81b3-4178-410c-99ef-8b303d32d68c" - ], - "x-ms-request-id": [ - "ea2c6191-1b99-438b-972e-23f23fe32660" - ], - "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": [ - "WESTUS:20191212T003955Z:bc3a81b3-4178-410c-99ef-8b303d32d68c" - ], - "Content-Length": [ - "1324" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"stepType\": \"HealthCheck\",\r\n \"attributes\": {\r\n \"type\": \"REST\",\r\n \"properties\": {\r\n \"healthChecks\": [\r\n {\r\n \"name\": \"webAppHealthCheck\",\r\n \"request\": {\r\n \"method\": \"GET\",\r\n \"uri\": \"https://clientvalidations.deploymentmanager.net/healthstatus\",\r\n \"authentication\": {\r\n \"type\": \"ApiKey\",\r\n \"name\": \"code\",\r\n \"in\": \"Header\",\r\n \"value\": \"AuthValue\"\r\n }\r\n },\r\n \"response\": {\r\n \"successStatusCodes\": [\r\n \"200\",\r\n \"204\"\r\n ],\r\n \"regex\": {\r\n \"matches\": [\r\n \"Contoso-Service-EndToEnd\",\r\n \"(?i)\\\"health_status\\\":((.|\\n)*)\\\"(green|yellow)\\\"\",\r\n \"(?mi)^(\\\"application_host\\\": 94781052)$\"\r\n ],\r\n \"matchQuantifier\": \"All\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"webBackEndHealthCheck\",\r\n \"request\": {\r\n \"method\": \"GET\",\r\n \"uri\": \"https://clientvalidations.deploymentmanager.net/healthstatus\",\r\n \"authentication\": {\r\n \"type\": \"RolloutIdentity\"\r\n }\r\n },\r\n \"response\": {\r\n \"successStatusCodes\": [\r\n \"200\",\r\n \"204\"\r\n ],\r\n \"regex\": {\r\n \"matches\": [\r\n \"Contoso-Service-Backend\",\r\n \"(?i)\\\"health_status\\\":((.|\\n)*)\\\"(green|yellow)\\\"\",\r\n \"(?mi)^(\\\"application_host\\\": 94781055)$\"\r\n ],\r\n \"matchQuantifier\": \"All\"\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"waitDuration\": \"PT10M\",\r\n \"maxElasticDuration\": \"PT15M\",\r\n \"healthyStateDuration\": \"PT30M\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/steps\",\r\n \"apiVersion\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768HealthCheckStep\",\r\n \"name\": \"admsdknet768HealthCheckStep\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/steps?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3N0ZXBzP2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ad671bea-aa5b-41f9-949f-c7bd28fe9453" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:39:54 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "ad671bea-aa5b-41f9-949f-c7bd28fe9453" - ], - "x-ms-correlation-request-id": [ - "11ea43ba-e1b5-4cd4-82c5-c40db85d4210" - ], - "x-ms-request-id": [ - "c30f9077-89fb-4ec9-b2fe-861e2037a41a" - ], - "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": [ - "WESTUS:20191212T003955Z:11ea43ba-e1b5-4cd4-82c5-c40db85d4210" - ], - "Content-Length": [ - "1710" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "[\r\n {\r\n \"properties\": {\r\n \"stepType\": \"HealthCheck\",\r\n \"attributes\": {\r\n \"type\": \"REST\",\r\n \"properties\": {\r\n \"healthChecks\": [\r\n {\r\n \"name\": \"webAppHealthCheck\",\r\n \"request\": {\r\n \"method\": \"GET\",\r\n \"uri\": \"https://clientvalidations.deploymentmanager.net/healthstatus\",\r\n \"authentication\": {\r\n \"type\": \"ApiKey\",\r\n \"name\": \"code\",\r\n \"in\": \"Header\",\r\n \"value\": \"AuthValue\"\r\n }\r\n },\r\n \"response\": {\r\n \"successStatusCodes\": [\r\n \"200\",\r\n \"204\"\r\n ],\r\n \"regex\": {\r\n \"matches\": [\r\n \"Contoso-Service-EndToEnd\",\r\n \"(?i)\\\"health_status\\\":((.|\\n)*)\\\"(green|yellow)\\\"\",\r\n \"(?mi)^(\\\"application_host\\\": 94781052)$\"\r\n ],\r\n \"matchQuantifier\": \"All\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"webBackEndHealthCheck\",\r\n \"request\": {\r\n \"method\": \"GET\",\r\n \"uri\": \"https://clientvalidations.deploymentmanager.net/healthstatus\",\r\n \"authentication\": {\r\n \"type\": \"RolloutIdentity\"\r\n }\r\n },\r\n \"response\": {\r\n \"successStatusCodes\": [\r\n \"200\",\r\n \"204\"\r\n ],\r\n \"regex\": {\r\n \"matches\": [\r\n \"Contoso-Service-Backend\",\r\n \"(?i)\\\"health_status\\\":((.|\\n)*)\\\"(green|yellow)\\\"\",\r\n \"(?mi)^(\\\"application_host\\\": 94781055)$\"\r\n ],\r\n \"matchQuantifier\": \"All\"\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"waitDuration\": \"PT10M\",\r\n \"maxElasticDuration\": \"PT15M\",\r\n \"healthyStateDuration\": \"PT30M\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/steps\",\r\n \"apiVersion\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768HealthCheckStep\",\r\n \"name\": \"admsdknet768HealthCheckStep\",\r\n \"location\": \"Central US\"\r\n },\r\n {\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768WaitStep\",\r\n \"name\": \"admsdknet768WaitStep\",\r\n \"location\": \"Central US\"\r\n }\r\n]", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768HealthCheckStep?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3N0ZXBzL2FkbXNka25ldDc2OEhlYWx0aENoZWNrU3RlcD9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3158355d-fb02-4bd5-b8f2-a1dc6e6ddcac" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:39:56 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "3158355d-fb02-4bd5-b8f2-a1dc6e6ddcac" - ], - "x-ms-correlation-request-id": [ - "43b865b1-86b9-4222-b064-caacc2f94328" - ], - "x-ms-request-id": [ - "be23dda3-a8b5-4982-a31a-e874d38bc1f4" - ], - "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": [ - "WESTUS:20191212T003956Z:43b865b1-86b9-4222-b064-caacc2f94328" - ], - "Content-Length": [ - "4" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "null", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768HealthCheckStep?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3N0ZXBzL2FkbXNka25ldDc2OEhlYWx0aENoZWNrU3RlcD9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "cf488aef-e2fa-4f4c-ba5a-c193b1045eaa" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:39:56 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "e8c318fc-d3bd-45fd-85dd-3650d48bfd10" - ], - "x-ms-correlation-request-id": [ - "e8c318fc-d3bd-45fd-85dd-3650d48bfd10" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T003956Z:e8c318fc-d3bd-45fd-85dd-3650d48bfd10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "177" - ], - "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/admsdknet768HealthCheckStep' under resource group 'admsdknet768' was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/steps/admsdknet768WaitStep?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3N0ZXBzL2FkbXNka25ldDc2OFdhaXRTdGVwP2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b57cc2a4-c166-444d-bd9e-d70604e69b7a" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:39:57 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "b57cc2a4-c166-444d-bd9e-d70604e69b7a" - ], - "x-ms-correlation-request-id": [ - "9e000755-626d-45d4-ace9-401f36a22586" - ], - "x-ms-request-id": [ - "c96dd0d3-fa91-40d9-960e-ca8ac9597711" - ], - "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": [ - "WESTUS:20191212T003958Z:9e000755-626d-45d4-ace9-401f36a22586" - ], - "Content-Length": [ - "4" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "null", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/operationResults/1e2ff337-84df-4499-8dcb-c14946dd7fd8?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlZ3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL29wZXJhdGlvblJlc3VsdHMvMWUyZmYzMzctODRkZi00NDk5LThkY2ItYzE0OTQ2ZGQ3ZmQ4P2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:40:48 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit?api-version=2019-11-01-preview" - ], - "Retry-After": [ - "30" - ], - "x-ms-client-request-id": [ - "94520345-6b6c-4e6f-824b-2539109a40fd" - ], - "x-ms-correlation-request-id": [ - "6fc4f87e-cd83-4d1a-a875-848f2c85d836" - ], - "x-ms-request-id": [ - "a849fdcb-a78d-4708-b6a4-5129a24b95f8" - ], - "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": [ - "WESTUS:20191212T004049Z:6fc4f87e-cd83-4d1a-a875-848f2c85d836" - ], - "Content-Length": [ - "106" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2019-12-12T00:39:58.887Z\",\r\n \"endTime\": \"2019-12-12T00:40:02.526Z\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcy9hZG1zZGtuZXQ3NjhTZXJ2aWNlL3NlcnZpY2VVbml0cz9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "54dc0bd5-32a9-4d76-9baf-0dbb152d54ba" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:40:49 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "54dc0bd5-32a9-4d76-9baf-0dbb152d54ba" - ], - "x-ms-correlation-request-id": [ - "b53853a3-8fbc-47fa-92ac-312eeb858637" - ], - "x-ms-request-id": [ - "b35d6240-1ba3-49ae-9998-13f6781d43e2" - ], - "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": [ - "WESTUS:20191212T004049Z:b53853a3-8fbc-47fa-92ac-312eeb858637" - ], - "Content-Length": [ - "1354" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "[\r\n {\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet768\",\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768InvalidServiceUnit\",\r\n \"name\": \"admsdknet768InvalidServiceUnit\",\r\n \"location\": \"Central US\"\r\n },\r\n {\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet768\",\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\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit\",\r\n \"name\": \"admsdknet768ServiceUnit\",\r\n \"location\": \"Central US\"\r\n }\r\n]", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768ServiceUnit?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcy9hZG1zZGtuZXQ3NjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ3NjhTZXJ2aWNlVW5pdD9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c12ad7d1-33a8-48dd-929b-4e98d7d6cd01" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:09 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "c12ad7d1-33a8-48dd-929b-4e98d7d6cd01" - ], - "x-ms-correlation-request-id": [ - "966b58ca-3943-4e8c-9875-8d9199f5bdca" - ], - "x-ms-request-id": [ - "68e50fb7-98fd-4ba7-9688-57e21aa6d212" - ], - "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": [ - "WESTUS:20191212T004110Z:966b58ca-3943-4e8c-9875-8d9199f5bdca" - ], - "Content-Length": [ - "4" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "null", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service/serviceUnits/admsdknet768InvalidServiceUnit?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcy9hZG1zZGtuZXQ3NjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ3NjhJbnZhbGlkU2VydmljZVVuaXQ/YXBpLXZlcnNpb249MjAxOS0xMS0wMS1wcmV2aWV3", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0096d40e-29cf-4e72-ada0-7bc9b4cdc74c" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:11 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "0096d40e-29cf-4e72-ada0-7bc9b4cdc74c" - ], - "x-ms-correlation-request-id": [ - "d1ecebee-da66-4852-902b-615d746a2247" - ], - "x-ms-request-id": [ - "46a95ff2-49c0-430d-acaa-32e852f5e99c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "X-Frame-Options": [ - "DENY" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14996" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004111Z:d1ecebee-da66-4852-902b-615d746a2247" - ], - "Content-Length": [ - "4" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "null", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service2?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcy9hZG1zZGtuZXQ3NjhTZXJ2aWNlMj9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"targetLocation\": \"Central US\",\r\n \"targetSubscriptionId\": \"1e591dc1-b014-4754-b53b-58b67bcab1cd\"\r\n },\r\n \"location\": \"Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1b3c9715-083d-4b4d-9717-f5ae9cd896ac" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "162" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:13 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "1b3c9715-083d-4b4d-9717-f5ae9cd896ac" - ], - "x-ms-correlation-request-id": [ - "bfc48402-e7c1-4d30-b3b4-a260d42f97e9" - ], - "x-ms-request-id": [ - "0964d6e4-68e1-4b36-b705-69b400cf459a" - ], - "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": [ - "WESTUS:20191212T004114Z:bfc48402-e7c1-4d30-b3b4-a260d42f97e9" - ], - "Content-Length": [ - "493" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"targetSubscriptionId\": \"1e591dc1-b014-4754-b53b-58b67bcab1cd\",\r\n \"targetLocation\": \"Central US\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies/services\",\r\n \"apiVersion\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service2\",\r\n \"name\": \"admsdknet768Service2\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcz9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3b9bd891-f6da-4750-886d-91bc43a3380a" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:13 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "3b9bd891-f6da-4750-886d-91bc43a3380a" - ], - "x-ms-correlation-request-id": [ - "1e4bcd34-dd6a-4b24-be3e-9ded22612805" - ], - "x-ms-request-id": [ - "7b0b2558-dc45-44c4-b08a-4b590187aa03" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "X-Frame-Options": [ - "DENY" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004114Z:1e4bcd34-dd6a-4b24-be3e-9ded22612805" - ], - "Content-Length": [ - "987" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "[\r\n {\r\n \"properties\": {\r\n \"targetSubscriptionId\": \"1e591dc1-b014-4754-b53b-58b67bcab1cd\",\r\n \"targetLocation\": \"Central US\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies/services\",\r\n \"apiVersion\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service\",\r\n \"name\": \"admsdknet768Service\",\r\n \"location\": \"Central US\"\r\n },\r\n {\r\n \"properties\": {\r\n \"targetSubscriptionId\": \"1e591dc1-b014-4754-b53b-58b67bcab1cd\",\r\n \"targetLocation\": \"Central US\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies/services\",\r\n \"apiVersion\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service2\",\r\n \"name\": \"admsdknet768Service2\",\r\n \"location\": \"Central US\"\r\n }\r\n]", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcy9hZG1zZGtuZXQ3NjhTZXJ2aWNlP2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7b90fc62-9c1d-4ecf-a1c9-a167177eddd5" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:14 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "7b90fc62-9c1d-4ecf-a1c9-a167177eddd5" - ], - "x-ms-correlation-request-id": [ - "df3c1d62-c6b5-425a-8bf3-b52e2cffa395" - ], - "x-ms-request-id": [ - "f109f645-48a0-4797-ba3e-6f3053d38cf4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "X-Frame-Options": [ - "DENY" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14995" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004115Z:df3c1d62-c6b5-425a-8bf3-b52e2cffa395" - ], - "Content-Length": [ - "4" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "null", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology/services/admsdknet768Service2?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neS9zZXJ2aWNlcy9hZG1zZGtuZXQ3NjhTZXJ2aWNlMj9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "188cc8e6-71a8-444f-8824-26dff4d46059" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:15 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "188cc8e6-71a8-444f-8824-26dff4d46059" - ], - "x-ms-correlation-request-id": [ - "0d5a5ed9-3de2-4e02-876c-b7125671c95b" - ], - "x-ms-request-id": [ - "ad91f31d-b605-4db3-a3f4-a4bf8a037d3d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "X-Frame-Options": [ - "DENY" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14994" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004116Z:0d5a5ed9-3de2-4e02-876c-b7125671c95b" - ], - "Content-Length": [ - "4" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "null", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768UpdatedArtifactSource?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL2FydGlmYWN0U291cmNlcy9hZG1zZGtuZXQ3NjhVcGRhdGVkQXJ0aWZhY3RTb3VyY2U/YXBpLXZlcnNpb249MjAxOS0xMS0wMS1wcmV2aWV3", - "RequestMethod": "PUT", - "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://admsdknet768stgacct.blob.core.windows.net/artifacts?sv=2017-04-17&sr=c&sig=e33a7UrVEu%2FJD9QUZz8taajW9NUThoikhz0K5zKoIZI%3D&st=2019-12-11T00%3A41%3A16Z&se=2019-12-14T00%3A41%3A16Z&sp=rl\"\r\n }\r\n }\r\n },\r\n \"location\": \"Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "94d1c50f-ba9c-4973-8187-23aab857567d" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "437" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:17 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "94d1c50f-ba9c-4973-8187-23aab857567d" - ], - "x-ms-correlation-request-id": [ - "e023bc16-879e-4ff8-8947-993556228c40" - ], - "x-ms-request-id": [ - "2eb5050e-4fa0-4258-a8f9-81d7df6c3340" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "X-Frame-Options": [ - "DENY" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1194" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004117Z:e023bc16-879e-4ff8-8947-993556228c40" - ], - "Content-Length": [ - "694" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "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://admsdknet768stgacct.blob.core.windows.net/artifacts?sv=2017-04-17&sr=c&sig=e33a7UrVEu%2FJD9QUZz8taajW9NUThoikhz0K5zKoIZI%3D&st=2019-12-11T00%3A41%3A16Z&se=2019-12-14T00%3A41%3A16Z&sp=rl\"\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/artifactSources\",\r\n \"apiVersion\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768UpdatedArtifactSource\",\r\n \"name\": \"admsdknet768UpdatedArtifactSource\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology2?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neTI/YXBpLXZlcnNpb249MjAxOS0xMS0wMS1wcmV2aWV3", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768UpdatedArtifactSource\"\r\n },\r\n \"location\": \"Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "10445918-0658-4cc5-a459-48de8c2f6622" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "252" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:18 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "10445918-0658-4cc5-a459-48de8c2f6622" - ], - "x-ms-correlation-request-id": [ - "f2bab59e-ef88-470a-a4a8-22b1b600eef0" - ], - "x-ms-request-id": [ - "63f94c79-b0f1-4ea6-a99d-b11ba3321dbb" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "X-Frame-Options": [ - "DENY" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1192" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004119Z:f2bab59e-ef88-470a-a4a8-22b1b600eef0" - ], - "Content-Length": [ - "560" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768UpdatedArtifactSource\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies\",\r\n \"apiVersion\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology2\",\r\n \"name\": \"admsdknet768ServiceTopology2\",\r\n \"location\": \"Central US\"\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzP2FwaS12ZXJzaW9uPTIwMTktMTEtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0a987c2c-b0d1-4686-ab5a-faa0ccc50c1b" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:18 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "0a987c2c-b0d1-4686-ab5a-faa0ccc50c1b" - ], - "x-ms-correlation-request-id": [ - "720b087f-0a01-4492-ab78-bd2c3a1c8123" - ], - "x-ms-request-id": [ - "810ded49-3713-4c79-86a0-23707762252a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "X-Frame-Options": [ - "DENY" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004119Z:720b087f-0a01-4492-ab78-bd2c3a1c8123" - ], - "Content-Length": [ - "1057" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "[\r\n {\r\n \"properties\": {\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768UpdatedArtifactSource\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies\",\r\n \"apiVersion\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology\",\r\n \"name\": \"admsdknet768ServiceTopology\",\r\n \"location\": \"Central US\"\r\n },\r\n {\r\n \"properties\": {\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768UpdatedArtifactSource\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies\",\r\n \"apiVersion\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology2\",\r\n \"name\": \"admsdknet768ServiceTopology2\",\r\n \"location\": \"Central US\"\r\n }\r\n]", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neT9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c39b06cf-1039-4f65-a320-a0534b14fc0e" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:20 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "c39b06cf-1039-4f65-a320-a0534b14fc0e" - ], - "x-ms-correlation-request-id": [ - "7cc546fb-10d4-4cb4-b7f7-e405368ac4bf" - ], - "x-ms-request-id": [ - "a35abe13-9654-4c4d-bd10-b2cca93f273f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "X-Frame-Options": [ - "DENY" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14993" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004121Z:7cc546fb-10d4-4cb4-b7f7-e405368ac4bf" - ], - "Content-Length": [ - "4" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "null", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet768ServiceTopology2?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL3NlcnZpY2VUb3BvbG9naWVzL2FkbXNka25ldDc2OFNlcnZpY2VUb3BvbG9neTI/YXBpLXZlcnNpb249MjAxOS0xMS0wMS1wcmV2aWV3", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6c8b5f8c-e4dd-4959-b593-c5934c4162d0" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:21 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "6c8b5f8c-e4dd-4959-b593-c5934c4162d0" - ], - "x-ms-correlation-request-id": [ - "e5a10c02-8939-462f-9ea5-fbbbc46e3c9a" - ], - "x-ms-request-id": [ - "d2f4c558-9825-45f9-b2cf-27e55a197f50" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "X-Frame-Options": [ - "DENY" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14992" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004122Z:e5a10c02-8939-462f-9ea5-fbbbc46e3c9a" - ], - "Content-Length": [ - "4" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "null", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL2FydGlmYWN0U291cmNlcz9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9074b432-0740-491f-863f-2c24e1b6dbed" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:21 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "9074b432-0740-491f-863f-2c24e1b6dbed" - ], - "x-ms-correlation-request-id": [ - "4c6ffa3c-dfbb-4acc-addb-c1069167dc83" - ], - "x-ms-request-id": [ - "5ac0d716-2ac9-43ab-9602-e396c02cb7d4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "X-Frame-Options": [ - "DENY" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004122Z:4c6ffa3c-dfbb-4acc-addb-c1069167dc83" - ], - "Content-Length": [ - "1377" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "[\r\n {\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://admsdknet768stgacct.blob.core.windows.net/artifacts?sv=2017-04-17&sr=c&sig=OZ%2Fb3lSOqOJvpchLdAfN36zgYdd14zNBkIM3TMbnYL8%3D&st=2019-12-11T00%3A30%3A25Z&se=2019-12-14T00%3A30%3A25Z&sp=rl\"\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/artifactSources\",\r\n \"apiVersion\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource\",\r\n \"name\": \"admsdknet768ArtifactSource\",\r\n \"location\": \"Central US\"\r\n },\r\n {\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://admsdknet768stgacct.blob.core.windows.net/artifacts?sv=2017-04-17&sr=c&sig=e33a7UrVEu%2FJD9QUZz8taajW9NUThoikhz0K5zKoIZI%3D&st=2019-12-11T00%3A41%3A16Z&se=2019-12-14T00%3A41%3A16Z&sp=rl\"\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/artifactSources\",\r\n \"apiVersion\": \"2019-11-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768UpdatedArtifactSource\",\r\n \"name\": \"admsdknet768UpdatedArtifactSource\",\r\n \"location\": \"Central US\"\r\n }\r\n]", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL2FydGlmYWN0U291cmNlcy9hZG1zZGtuZXQ3NjhBcnRpZmFjdFNvdXJjZT9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9bdf7829-c138-4092-8921-c5cfc116d6ef" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:22 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "9bdf7829-c138-4092-8921-c5cfc116d6ef" - ], - "x-ms-correlation-request-id": [ - "342b5d54-21d0-4836-b90f-b0c713fedc98" - ], - "x-ms-request-id": [ - "80d28db1-48c0-4ef9-a43b-2f1ea4dcffde" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "X-Frame-Options": [ - "DENY" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14991" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004123Z:342b5d54-21d0-4836-b90f-b0c713fedc98" - ], - "Content-Length": [ - "4" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "null", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768UpdatedArtifactSource?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL2FydGlmYWN0U291cmNlcy9hZG1zZGtuZXQ3NjhVcGRhdGVkQXJ0aWZhY3RTb3VyY2U/YXBpLXZlcnNpb249MjAxOS0xMS0wMS1wcmV2aWV3", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "50c03e97-0750-4ad4-885c-811c0c97c9fc" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:23 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-client-request-id": [ - "50c03e97-0750-4ad4-885c-811c0c97c9fc" - ], - "x-ms-correlation-request-id": [ - "c6c63065-b989-4c89-b479-a657992265bd" - ], - "x-ms-request-id": [ - "bda199f8-9bcb-4df9-9616-b70423180ead" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "X-Frame-Options": [ - "DENY" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14990" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004124Z:c6c63065-b989-4c89-b479-a657992265bd" - ], - "Content-Length": [ - "4" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "null", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet768/providers/Microsoft.DeploymentManager/artifactSources/admsdknet768ArtifactSource?api-version=2019-11-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDc2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkRlcGxveW1lbnRNYW5hZ2VyL2FydGlmYWN0U291cmNlcy9hZG1zZGtuZXQ3NjhBcnRpZmFjdFNvdXJjZT9hcGktdmVyc2lvbj0yMDE5LTExLTAxLXByZXZpZXc=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2a368546-d776-4883-bdff-13cfb3ff4548" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:23 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "e73ecec5-c2be-40a1-8286-3cad2510dded" - ], - "x-ms-correlation-request-id": [ - "e73ecec5-c2be-40a1-8286-3cad2510dded" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004124Z:e73ecec5-c2be-40a1-8286-3cad2510dded" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "186" - ], - "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/admsdknet768ArtifactSource' under resource group 'admsdknet768' was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet768?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlZ3JvdXBzL2FkbXNka25ldDc2OD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "45b21233-41cf-48cb-a31a-aa84ea805be0" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:24 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "fbb41e8a-01fe-4098-9037-c77c8c97aa79" - ], - "x-ms-correlation-request-id": [ - "fbb41e8a-01fe-4098-9037-c77c8c97aa79" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004125Z:fbb41e8a-01fe-4098-9037-c77c8c97aa79" - ], - "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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlEzTmpndFEwVk9WRkpCVEZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKalpXNTBjbUZzZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:39 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "e7ad963d-afda-4d3a-8b17-07dc5ca1d5a5" - ], - "x-ms-correlation-request-id": [ - "e7ad963d-afda-4d3a-8b17-07dc5ca1d5a5" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004140Z:e7ad963d-afda-4d3a-8b17-07dc5ca1d5a5" - ], - "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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlEzTmpndFEwVk9WRkpCVEZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKalpXNTBjbUZzZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:41:55 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "34244960-1bad-4f1b-9852-a778997e83a6" - ], - "x-ms-correlation-request-id": [ - "34244960-1bad-4f1b-9852-a778997e83a6" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004155Z:34244960-1bad-4f1b-9852-a778997e83a6" - ], - "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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlEzTmpndFEwVk9WRkpCVEZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKalpXNTBjbUZzZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:42:10 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "0fa36344-8c7a-4183-8e72-0476f4bc85e8" - ], - "x-ms-correlation-request-id": [ - "0fa36344-8c7a-4183-8e72-0476f4bc85e8" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004211Z:0fa36344-8c7a-4183-8e72-0476f4bc85e8" - ], - "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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlEzTmpndFEwVk9WRkpCVEZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKalpXNTBjbUZzZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:42:25 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "e53638c4-1ac6-439a-bdfd-02a29934d1f8" - ], - "x-ms-correlation-request-id": [ - "e53638c4-1ac6-439a-bdfd-02a29934d1f8" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004226Z:e53638c4-1ac6-439a-bdfd-02a29934d1f8" - ], - "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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlEzTmpndFEwVk9WRkpCVEZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKalpXNTBjbUZzZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:42:40 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "ea0b0418-b598-4268-a0d2-e3ce1632e018" - ], - "x-ms-correlation-request-id": [ - "ea0b0418-b598-4268-a0d2-e3ce1632e018" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004241Z:ea0b0418-b598-4268-a0d2-e3ce1632e018" - ], - "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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlEzTmpndFEwVk9WRkpCVEZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKalpXNTBjbUZzZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:42:56 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "1ee29914-5fe6-4ab4-b22b-5c76aff0feac" - ], - "x-ms-correlation-request-id": [ - "1ee29914-5fe6-4ab4-b22b-5c76aff0feac" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004256Z:1ee29914-5fe6-4ab4-b22b-5c76aff0feac" - ], - "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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlEzTmpndFEwVk9WRkpCVEZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKalpXNTBjbUZzZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:43:11 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "1743d05e-c9c6-4e7b-afc2-324242fcfa21" - ], - "x-ms-correlation-request-id": [ - "1743d05e-c9c6-4e7b-afc2-324242fcfa21" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004311Z:1743d05e-c9c6-4e7b-afc2-324242fcfa21" - ], - "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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlEzTmpndFEwVk9WRkpCVEZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKalpXNTBjbUZzZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:43:26 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "46e02e9e-48cd-4e84-90a3-1a7da8ba1da6" - ], - "x-ms-correlation-request-id": [ - "46e02e9e-48cd-4e84-90a3-1a7da8ba1da6" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004326Z:46e02e9e-48cd-4e84-90a3-1a7da8ba1da6" - ], - "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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlEzTmpndFEwVk9WRkpCVEZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKalpXNTBjbUZzZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:43:41 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "0db87b05-96cb-4b4a-8448-6d5c62cc6a23" - ], - "x-ms-correlation-request-id": [ - "0db87b05-96cb-4b4a-8448-6d5c62cc6a23" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004341Z:0db87b05-96cb-4b4a-8448-6d5c62cc6a23" - ], - "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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlEzTmpndFEwVk9WRkpCVEZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKalpXNTBjbUZzZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:43:56 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "cd13c8c9-d1bd-4d86-90ad-27acaf2c5132" - ], - "x-ms-correlation-request-id": [ - "cd13c8c9-d1bd-4d86-90ad-27acaf2c5132" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004356Z:cd13c8c9-d1bd-4d86-90ad-27acaf2c5132" - ], - "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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlEzTmpndFEwVk9WRkpCVEZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKalpXNTBjbUZzZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:44:12 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "9de489f2-4b97-443c-a8f0-2aada97d63ea" - ], - "x-ms-correlation-request-id": [ - "9de489f2-4b97-443c-a8f0-2aada97d63ea" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004412Z:9de489f2-4b97-443c-a8f0-2aada97d63ea" - ], - "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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ3NjgtQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJjZW50cmFsdXMifQ?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlEzTmpndFEwVk9WRkpCVEZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKalpXNTBjbUZzZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 12 Dec 2019 00:44:12 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "400fc27a-79ed-4832-816c-158107c78c95" - ], - "x-ms-correlation-request-id": [ - "400fc27a-79ed-4832-816c-158107c78c95" - ], - "x-ms-routing-request-id": [ - "WESTUS:20191212T004412Z:400fc27a-79ed-4832-816c-158107c78c95" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - ".ctor": [ - "admsdknet768" - ] - }, - "Variables": { - "SubscriptionId": "53012dcb-5039-4e96-8e6c-5d913da1cdb5" - } -} \ No newline at end of file diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage.Copy.Parameters.json b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage.Copy.Parameters.json deleted file mode 100644 index dd3e85246bb41..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage.Copy.Parameters.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage.Copy.Template.json b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage.Copy.Template.json deleted file mode 100644 index b3970807bc876..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage.Copy.Template.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$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": {} -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage.Parameters.json b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage.Parameters.json deleted file mode 100644 index 0e594cdaafeaa..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage.Parameters.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$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/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage.Template.json b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage.Template.json deleted file mode 100644 index b3970807bc876..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage.Template.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$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": {} -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage_Invalid.Parameters.json b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage_Invalid.Parameters.json deleted file mode 100644 index d7ed4bf80c2af..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/ArtifactRoot/Storage_Invalid.Parameters.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$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 - } - } -} diff --git a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/EndToEndFunctionalTests.cs b/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/EndToEndFunctionalTests.cs deleted file mode 100644 index a18328a1ad724..0000000000000 --- a/sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Tests/EndToEndFunctionalTests.cs +++ /dev/null @@ -1,913 +0,0 @@ -// 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.Linq; - 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; - - /// - /// Terminal ARM deployment states - /// - private static string[] terminalStates = - { - "Succeeded", "Failed", "Canceled" - }; - - /// - /// 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))) - { - 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 updatedServiceTopology = deploymentManagerClient.ServiceTopologies.CreateOrUpdate( - resourceGroupName: clientHelper.ResourceGroupName, - serviceTopologyName: serviceTopologyName, - serviceTopologyInfo: serviceTopology); - - this.ValidateTopology(serviceTopology, updatedServiceTopology); - - // Add second topology to test list operation. - var secondTopologyName = serviceTopologyName + "2"; - serviceTopology.ArtifactSourceId = artifactSource.Id; - var secondServiceTopology = deploymentManagerClient.ServiceTopologies.CreateOrUpdate( - resourceGroupName: clientHelper.ResourceGroupName, - serviceTopologyName: secondTopologyName, - serviceTopologyInfo: serviceTopology); - - // Test list topology. - var serviceTopologies = deploymentManagerClient.ServiceTopologies.List( - resourceGroupName: clientHelper.ResourceGroupName); - - Assert.Equal(2, serviceTopologies.Count); - this.ValidateTopology(updatedServiceTopology, serviceTopologies.ToList().First(st => st.Name.Equals(serviceTopology.Name, StringComparison.InvariantCultureIgnoreCase))); - - // Test Delete topology. - deploymentManagerClient.ServiceTopologies.Delete( - resourceGroupName: clientHelper.ResourceGroupName, - serviceTopologyName: serviceTopologyName); - - deploymentManagerClient.ServiceTopologies.Delete( - resourceGroupName: clientHelper.ResourceGroupName, - serviceTopologyName: secondTopologyName); - - var cloudException = Assert.Throws(() => deploymentManagerClient.ServiceTopologies.Get( - resourceGroupName: clientHelper.ResourceGroupName, - serviceTopologyName: serviceTopologyName)); - Assert.Equal(HttpStatusCode.NotFound, cloudException.Response.StatusCode); - - // Test list artifact sources. - var artifactSources = deploymentManagerClient.ArtifactSources.List( - resourceGroupName: clientHelper.ResourceGroupName); - - Assert.Equal(2, artifactSources.Count); - this.ValidateArtifactSource(artifactSource, artifactSources.ToList().First(@as => @as.Name.Equals(artifactSource.Name, StringComparison.InvariantCultureIgnoreCase))); - - // 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); - - // Add second service to test list operation. - var secondServiceName = serviceName + "2"; - var secondService = deploymentManagerClient.Services.CreateOrUpdate( - resourceGroupName: clientHelper.ResourceGroupName, - serviceTopologyName: serviceTopologyResource.Name, - serviceName: secondServiceName, - serviceInfo: service); - - // Test list services. - var services = deploymentManagerClient.Services.List( - resourceGroupName: clientHelper.ResourceGroupName, - serviceTopologyName: serviceTopologyResource.Name); - - Assert.Equal(2, services.Count); - this.ValidateService(updatedService, services.ToList().First(st => st.Name.Equals(service.Name, StringComparison.InvariantCultureIgnoreCase))); - - // Test Delete service. - deploymentManagerClient.Services.Delete( - resourceGroupName: clientHelper.ResourceGroupName, - serviceTopologyName: serviceTopologyResource.Name, - serviceName: serviceName); - - deploymentManagerClient.Services.Delete( - resourceGroupName: clientHelper.ResourceGroupName, - serviceTopologyName: serviceTopologyResource.Name, - serviceName: secondServiceName); - - 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 updatedServiceUnit = deploymentManagerClient.ServiceUnits.CreateOrUpdate( - resourceGroupName: clientHelper.ResourceGroupName, - serviceTopologyName: serviceTopologyResource.Name, - serviceName: serviceName, - serviceUnitName: serviceUnitName, - serviceUnitInfo: serviceUnit); - - this.ValidateServiceUnit(serviceUnit, updatedServiceUnit); - - // Test list service units - var serviceUnits = deploymentManagerClient.ServiceUnits.List( - resourceGroupName: clientHelper.ResourceGroupName, - serviceTopologyName: serviceTopologyResource.Name, - serviceName: serviceName); - - Assert.Equal(2, serviceUnits.Count); - this.ValidateServiceUnit(updatedServiceUnit, serviceUnits.ToList().First(st => st.Name.Equals(updatedServiceUnit.Name, StringComparison.InvariantCultureIgnoreCase))); - - // 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); - - this.HealthCheckStepTests(location, clientHelper, deploymentManagerClient); - - // 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 HealthCheckStepTests( - string location, - DeploymentManagerClientHelper clientHelper, - AzureDeploymentManagerClient deploymentManagerClient) - { - // Test Create step. - var stepName = clientHelper.ResourceGroupName + "HealthCheckStep"; - - var healthChecks = new List(); - - healthChecks.Add(new RestHealthCheck() - { - Name = "webAppHealthCheck", - Request = new RestRequest() - { - Method = RestRequestMethod.GET, - Uri = "https://clientvalidations.deploymentmanager.net/healthstatus", - Authentication = new ApiKeyAuthentication() - { - Name = "code", - InProperty = RestAuthLocation.Header, - Value = "AuthValue" - } - }, - Response = new RestResponse() - { - SuccessStatusCodes = new List { "200", "204" }, - Regex = new RestResponseRegex() - { - MatchQuantifier = RestMatchQuantifier.All, - Matches = new List - { - "Contoso-Service-EndToEnd", - "(?i)\"health_status\":((.|\n)*)\"(green|yellow)\"", - "(?mi)^(\"application_host\": 94781052)$" - } - } - } - }); - - healthChecks.Add(new RestHealthCheck() - { - Name = "webBackEndHealthCheck", - Request = new RestRequest() - { - Method = RestRequestMethod.GET, - Uri = "https://clientvalidations.deploymentmanager.net/healthstatus", - Authentication = new RolloutIdentityAuthentication() - }, - Response = new RestResponse() - { - SuccessStatusCodes = new List { "200", "204" }, - Regex = new RestResponseRegex() - { - MatchQuantifier = RestMatchQuantifier.All, - Matches = new List - { - "Contoso-Service-Backend", - "(?i)\"health_status\":((.|\n)*)\"(green|yellow)\"", - "(?mi)^(\"application_host\": 94781055)$" - } - } - } - }); - - var stepProperties = new HealthCheckStepProperties() - { - Attributes = new RestHealthCheckStepAttributes() - { - WaitDuration = "PT10M", - MaxElasticDuration = "PT15M", - HealthyStateDuration = "PT30M", - HealthChecks = healthChecks - } - }; - - var inputStep = new StepResource( - location: location, - properties: stepProperties, - name: stepName); - - var stepResponse = deploymentManagerClient.Steps.CreateOrUpdate( - resourceGroupName: clientHelper.ResourceGroupName, - stepName: stepName, - stepInfo: inputStep); - - this.ValidateHealthCheckStep(inputStep, stepResponse); - - // Test list steps. - var steps = deploymentManagerClient.Steps.List( - resourceGroupName: clientHelper.ResourceGroupName); - Assert.Equal(2, steps.Count); - this.ValidateHealthCheckStep(inputStep, steps.ToList().First(s => s.Name.Equals(inputStep.Name, StringComparison.InvariantCultureIgnoreCase))); - - 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 ValidateHealthCheckStep(StepResource inputStep, StepResource stepResponse) - { - Assert.NotNull(stepResponse); - Assert.Equal(inputStep.Location, stepResponse.Location); - Assert.Equal(inputStep.Name, stepResponse.Name); - - var stepProperties = stepResponse.Properties as HealthCheckStepProperties; - Assert.NotNull(stepProperties); - Assert.Equal(((HealthCheckStepProperties)inputStep.Properties).Attributes.WaitDuration, stepProperties.Attributes.WaitDuration); - Assert.Equal(((HealthCheckStepProperties)inputStep.Properties).Attributes.MaxElasticDuration, stepProperties.Attributes.MaxElasticDuration); - Assert.Equal(((HealthCheckStepProperties)inputStep.Properties).Attributes.HealthyStateDuration, stepProperties.Attributes.HealthyStateDuration); - Assert.Equal( - ((RestHealthCheckStepAttributes)((HealthCheckStepProperties)inputStep.Properties).Attributes).HealthChecks.Count, - ((RestHealthCheckStepAttributes)stepProperties.Attributes).HealthChecks.Count); - Assert.Equal( - ((RestHealthCheckStepAttributes)((HealthCheckStepProperties)inputStep.Properties).Attributes).HealthChecks[0].Name, - ((RestHealthCheckStepAttributes)stepProperties.Attributes).HealthChecks[0].Name); - Assert.Equal( - ((RestHealthCheckStepAttributes)((HealthCheckStepProperties)inputStep.Properties).Attributes).HealthChecks[0].Request.Method, - ((RestHealthCheckStepAttributes)stepProperties.Attributes).HealthChecks[0].Request.Method); - Assert.Equal( - ((RestHealthCheckStepAttributes)((HealthCheckStepProperties)inputStep.Properties).Attributes).HealthChecks[0].Request.Uri, - ((RestHealthCheckStepAttributes)stepProperties.Attributes).HealthChecks[0].Request.Uri); - Assert.Equal( - ((ApiKeyAuthentication)((RestHealthCheckStepAttributes)((HealthCheckStepProperties)inputStep.Properties).Attributes).HealthChecks[0].Request.Authentication).Name, - ((ApiKeyAuthentication)((RestHealthCheckStepAttributes)stepProperties.Attributes).HealthChecks[0].Request.Authentication).Name); - Assert.Equal( - ((ApiKeyAuthentication)((RestHealthCheckStepAttributes)((HealthCheckStepProperties)inputStep.Properties).Attributes).HealthChecks[0].Request.Authentication).InProperty, - ((ApiKeyAuthentication)((RestHealthCheckStepAttributes)stepProperties.Attributes).HealthChecks[0].Request.Authentication).InProperty); - Assert.Equal( - ((ApiKeyAuthentication)((RestHealthCheckStepAttributes)((HealthCheckStepProperties)inputStep.Properties).Attributes).HealthChecks[0].Request.Authentication).Value, - ((ApiKeyAuthentication)((RestHealthCheckStepAttributes)stepProperties.Attributes).HealthChecks[0].Request.Authentication).Value); - Assert.Equal( - ((RestHealthCheckStepAttributes)((HealthCheckStepProperties)inputStep.Properties).Attributes).HealthChecks[0].Response.SuccessStatusCodes.Count, - ((RestHealthCheckStepAttributes)stepProperties.Attributes).HealthChecks[0].Response.SuccessStatusCodes.Count); - Assert.Equal( - ((RestHealthCheckStepAttributes)((HealthCheckStepProperties)inputStep.Properties).Attributes).HealthChecks[0].Response.Regex.MatchQuantifier, - ((RestHealthCheckStepAttributes)stepProperties.Attributes).HealthChecks[0].Response.Regex.MatchQuantifier); - - foreach (var regex in ((RestHealthCheckStepAttributes)((HealthCheckStepProperties)inputStep.Properties).Attributes).HealthChecks[0].Response.Regex.Matches) - { - Assert.True( - ((RestHealthCheckStepAttributes)stepProperties.Attributes).HealthChecks[0].Response.Regex.Matches.Contains(regex)); - } - } - - 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 StepGroup( - name: "First_Region", - deploymentTargetId: serviceUnitId) - { - PreDeploymentSteps = new List () { new PrePostStep(stepId) } - }; - - var stepGroupForFailureRollout = new StepGroup( - 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); - - var rollouts = deploymentManagerClient.Rollouts.List( - resourceGroupName: clientHelper.ResourceGroupName); - - Assert.Equal(2, rollouts.Count); - Assert.NotEmpty(rollouts.Where(r => r.Name.Equals(failureRolloutName, StringComparison.InvariantCultureIgnoreCase))); - - // 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 (!this.IsRolloutInTerminalState(rollout.Status)); - - return rollout; - } - - private bool IsRolloutInTerminalState(string status) - { - return EndToEndFunctionalTests.terminalStates.Any( - s => s.Equals(status, StringComparison.OrdinalIgnoreCase)); - } - - 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/sdk/deploymentmanager/ci.mgmt.yml b/sdk/deploymentmanager/ci.mgmt.yml deleted file mode 100644 index add372e7e223d..0000000000000 --- a/sdk/deploymentmanager/ci.mgmt.yml +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - -trigger: none -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/deploymentmanager/ci.mgmt.yml - - sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/ - -extends: - template: /eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: deploymentmanager - BuildSnippets: false - LimitForPullRequest: true - Artifacts: - - name: Azure.ResourceManager.DeploymentManager - safeName: AzureResourceManagerDeploymentManager diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight.Containers/samples/autorest.tests.md b/sdk/hdinsight/Azure.ResourceManager.HDInsight.Containers/samples/autorest.tests.md deleted file mode 100644 index 0196a2e4f7a1f..0000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight.Containers/samples/autorest.tests.md +++ /dev/null @@ -1,13 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateTests` to generate code. - -# Azure.ResourceManager.HDInsight.Containers.Samples - -> see https://aka.ms/autorest -``` yaml -require: ../src/autorest.md -include-x-ms-examples-original-file: true -testgen: - sample: true -``` \ No newline at end of file diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/autorest.tests.md b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/autorest.tests.md deleted file mode 100644 index 15376defe308b..0000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/autorest.tests.md +++ /dev/null @@ -1,13 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateTests` to generate code. - -# Azure.ResourceManager.RecoveryServicesDataReplication.Tests - -> see https://aka.ms/autorest -``` yaml -require: ../src/autorest.md -include-x-ms-examples-original-file: true -testgen: - sample: true -``` \ No newline at end of file diff --git a/sdk/resourceconnector/Azure.ResourceManager.ResourceConnector/samples/autorest.tests.md b/sdk/resourceconnector/Azure.ResourceManager.ResourceConnector/samples/autorest.tests.md deleted file mode 100644 index 5dd9cf715c01e..0000000000000 --- a/sdk/resourceconnector/Azure.ResourceManager.ResourceConnector/samples/autorest.tests.md +++ /dev/null @@ -1,13 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateTests` to generate code. - -# Azure.ResourceManager.ResourceConnector.Tests - -> see https://aka.ms/autorest -``` yaml -require: ../src/autorest.md -include-x-ms-examples-original-file: true -testgen: - sample: true -``` \ No newline at end of file diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index 1e9862e171e39..deff7b7f2131b 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -61,7 +61,6 @@ trigger: - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup - sdk/datashare/Azure.ResourceManager.DataShare - sdk/defendereasm/Azure.ResourceManager.DefenderEasm - - sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization - sdk/devcenter/Azure.ResourceManager.DevCenter - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices @@ -244,7 +243,6 @@ pr: - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup - sdk/datashare/Azure.ResourceManager.DataShare - sdk/defendereasm/Azure.ResourceManager.DefenderEasm - - sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization - sdk/devcenter/Azure.ResourceManager.DevCenter - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices