From 391e9bfe9424045226c8e3f06f05598bc9f400a6 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Mon, 12 Oct 2020 11:29:28 +0800 Subject: [PATCH] support webapp windows container (#1148) --- .../CanCRUDWebAppWithContainer.json | 676 ++++++++++++++++++ Tests/Fluent.Tests/WebApp/WebAppsTests.cs | 38 + .../Domain/InterfaceImpl/WebAppImpl.cs | 6 +- .../Domain/WebApp/Definition/IDefinition.cs | 16 +- .../AppService/PricingTier.cs | 3 + .../AppService/WebAppImpl.cs | 38 +- 6 files changed, 755 insertions(+), 22 deletions(-) create mode 100644 Tests/Fluent.Tests/SessionRecords/Fluent.Tests.WebApp.WebApps/CanCRUDWebAppWithContainer.json diff --git a/Tests/Fluent.Tests/SessionRecords/Fluent.Tests.WebApp.WebApps/CanCRUDWebAppWithContainer.json b/Tests/Fluent.Tests/SessionRecords/Fluent.Tests.WebApp.WebApps/CanCRUDWebAppWithContainer.json new file mode 100644 index 000000000..0bce7d8e1 --- /dev/null +++ b/Tests/Fluent.Tests/SessionRecords/Fluent.Tests.WebApp.WebApps/CanCRUDWebAppWithContainer.json @@ -0,0 +1,676 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourcegroups/javacsmrg852?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWMwYWE1ZjctOWU3OC00MGM5LTg1Y2QtNTM1YzYzMDViMzgwL3Jlc291cmNlZ3JvdXBzL2phdmFjc21yZzg1Mj9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"eastus\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1a3ecc9c-5642-4c84-a22a-33d38e572813" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29220.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.ResourceManager.Fluent.ResourceManagementClient/1.0.0.66", + "MacAddressHash/5b986dbc01e2cd9262cdc8765199485ab440ab932e80985aff873a3788750edd" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "28" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "1f25a8ac-aa8b-4d65-8602-51230c28c824" + ], + "x-ms-correlation-request-id": [ + "1f25a8ac-aa8b-4d65-8602-51230c28c824" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20201009T044825Z:1f25a8ac-aa8b-4d65-8602-51230c28c824" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 09 Oct 2020 04:48:25 GMT" + ], + "Content-Length": [ + "221" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852\",\r\n \"name\": \"javacsmrg852\",\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852/providers/Microsoft.Web/serverfarms/java-asp-4143?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWMwYWE1ZjctOWU3OC00MGM5LTg1Y2QtNTM1YzYzMDViMzgwL3Jlc291cmNlR3JvdXBzL2phdmFjc21yZzg1Mi9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9qYXZhLWFzcC00MTQzP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"P1v3\",\r\n \"tier\": \"PremiumV3\",\r\n \"size\": \"P1v3\"\r\n },\r\n \"kind\": \"app\",\r\n \"location\": \"eastus\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4f44875b-7d3f-4d0d-93ad-696019b720ae" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29220.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.AppService.Fluent.WebSiteManagementClient/1.0.0.66", + "MacAddressHash/5b986dbc01e2cd9262cdc8765199485ab440ab932e80985aff873a3788750edd" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "146" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "10434657-8992-43d0-bc6f-a7b06cb1db5d" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "526298e6-c01f-4827-b8b1-8a576a6f77fd" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20201009T044836Z:526298e6-c01f-4827-b8b1-8a576a6f77fd" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 09 Oct 2020 04:48:36 GMT" + ], + "Content-Length": [ + "1321" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852/providers/Microsoft.Web/serverfarms/java-asp-4143\",\r\n \"name\": \"java-asp-4143\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"East US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"serverFarmId\": 25982,\r\n \"name\": \"java-asp-4143\",\r\n \"workerSize\": \"SmallV3\",\r\n \"workerSizeId\": 6,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 1,\r\n \"currentWorkerSize\": \"SmallV3\",\r\n \"currentWorkerSizeId\": 6,\r\n \"currentNumberOfWorkers\": 1,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"javacsmrg852-EastUSwebspace\",\r\n \"subscription\": \"ec0aa5f7-9e78-40c9-85cd-535c6305b380\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 30,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Dedicated\",\r\n \"siteMode\": null,\r\n \"geoRegion\": \"East US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": {},\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"javacsmrg852\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-blu-177_25982\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"P1v3\",\r\n \"tier\": \"PremiumV3\",\r\n \"size\": \"P1v3\",\r\n \"family\": \"Pv3\",\r\n \"capacity\": 1\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852/providers/Microsoft.Web/sites/java-webapp-6280?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWMwYWE1ZjctOWU3OC00MGM5LTg1Y2QtNTM1YzYzMDViMzgwL3Jlc291cmNlR3JvdXBzL2phdmFjc21yZzg1Mi9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9qYXZhLXdlYmFwcC02MjgwP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852/providers/Microsoft.Web/serverfarms/java-asp-4143\"\r\n },\r\n \"kind\": \"app\",\r\n \"location\": \"East US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "81d16cb7-7f08-4bfb-88ea-74c8d4556586" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29220.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.AppService.Fluent.WebSiteManagementClient/1.0.0.66", + "MacAddressHash/5b986dbc01e2cd9262cdc8765199485ab440ab932e80985aff873a3788750edd" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "240" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"1D69DF776AF6F20\"" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f353e60a-b186-461c-90b3-6a250ad9d464" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ + "499" + ], + "x-ms-correlation-request-id": [ + "749e012a-77c2-4bdf-9a7a-230bb8db6f33" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20201009T044859Z:749e012a-77c2-4bdf-9a7a-230bb8db6f33" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 09 Oct 2020 04:48:59 GMT" + ], + "Content-Length": [ + "5699" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852/providers/Microsoft.Web/sites/java-webapp-6280\",\r\n \"name\": \"java-webapp-6280\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"East US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"name\": \"java-webapp-6280\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"java-webapp-6280.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"javacsmrg852-EastUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-blu-177.api.azurewebsites.windows.net:454/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/webspaces/javacsmrg852-EastUSwebspace/sites/java-webapp-6280\",\r\n \"repositorySiteName\": \"java-webapp-6280\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"java-webapp-6280.azurewebsites.net\",\r\n \"java-webapp-6280.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"java-webapp-6280.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"java-webapp-6280.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852/providers/Microsoft.Web/serverfarms/java-asp-4143\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-10-09T04:48:42.6\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": {\r\n \"numberOfWorkers\": null,\r\n \"defaultDocuments\": null,\r\n \"netFrameworkVersion\": null,\r\n \"phpVersion\": null,\r\n \"pythonVersion\": null,\r\n \"nodeVersion\": null,\r\n \"powerShellVersion\": null,\r\n \"linuxFxVersion\": null,\r\n \"windowsFxVersion\": null,\r\n \"requestTracingEnabled\": null,\r\n \"remoteDebuggingEnabled\": null,\r\n \"remoteDebuggingVersion\": null,\r\n \"httpLoggingEnabled\": null,\r\n \"azureMonitorLogCategories\": null,\r\n \"acrUseManagedIdentityCreds\": false,\r\n \"acrUserManagedIdentityID\": null,\r\n \"logsDirectorySizeLimit\": null,\r\n \"detailedErrorLoggingEnabled\": null,\r\n \"publishingUsername\": null,\r\n \"publishingPassword\": null,\r\n \"appSettings\": null,\r\n \"azureStorageAccounts\": null,\r\n \"metadata\": null,\r\n \"connectionStrings\": null,\r\n \"machineKey\": null,\r\n \"handlerMappings\": null,\r\n \"documentRoot\": null,\r\n \"scmType\": null,\r\n \"use32BitWorkerProcess\": null,\r\n \"webSocketsEnabled\": null,\r\n \"alwaysOn\": null,\r\n \"javaVersion\": null,\r\n \"javaContainer\": null,\r\n \"javaContainerVersion\": null,\r\n \"appCommandLine\": null,\r\n \"managedPipelineMode\": null,\r\n \"virtualApplications\": null,\r\n \"winAuthAdminState\": null,\r\n \"winAuthTenantState\": null,\r\n \"customAppPoolIdentityAdminState\": null,\r\n \"customAppPoolIdentityTenantState\": null,\r\n \"runtimeADUser\": null,\r\n \"runtimeADUserPassword\": null,\r\n \"loadBalancing\": null,\r\n \"routingRules\": null,\r\n \"experiments\": null,\r\n \"limits\": null,\r\n \"autoHealEnabled\": null,\r\n \"autoHealRules\": null,\r\n \"tracingOptions\": null,\r\n \"vnetName\": null,\r\n \"vnetRouteAllEnabled\": null,\r\n \"cors\": null,\r\n \"push\": null,\r\n \"apiDefinition\": null,\r\n \"apiManagementConfig\": null,\r\n \"autoSwapSlotName\": null,\r\n \"localMySqlEnabled\": null,\r\n \"managedServiceIdentityId\": null,\r\n \"xManagedServiceIdentityId\": null,\r\n \"ipSecurityRestrictions\": [\r\n {\r\n \"ipAddress\": \"Any\",\r\n \"action\": \"Allow\",\r\n \"priority\": 1,\r\n \"name\": \"Allow all\",\r\n \"description\": \"Allow all access\"\r\n }\r\n ],\r\n \"scmIpSecurityRestrictions\": [\r\n {\r\n \"ipAddress\": \"Any\",\r\n \"action\": \"Allow\",\r\n \"priority\": 1,\r\n \"name\": \"Allow all\",\r\n \"description\": \"Allow all access\"\r\n }\r\n ],\r\n \"scmIpSecurityRestrictionsUseMain\": null,\r\n \"http20Enabled\": null,\r\n \"minTlsVersion\": null,\r\n \"scmMinTlsVersion\": null,\r\n \"ftpsState\": null,\r\n \"preWarmedInstanceCount\": null,\r\n \"functionAppScaleLimit\": null,\r\n \"healthCheckPath\": null,\r\n \"fileChangeAuditEnabled\": null,\r\n \"functionsRuntimeScaleMonitoringEnabled\": null,\r\n \"websiteTimeZone\": null,\r\n \"minimumElasticInstanceCount\": 0\r\n },\r\n \"deploymentId\": \"java-webapp-6280\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"PremiumV3\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertMode\": \"Required\",\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"20.49.104.0\",\r\n \"possibleInboundIpAddresses\": \"20.49.104.0\",\r\n \"ftpUsername\": \"java-webapp-6280\\\\$java-webapp-6280\",\r\n \"ftpsHostName\": \"ftps://waws-prod-blu-177.ftp.azurewebsites.windows.net/site/wwwroot\",\r\n \"outboundIpAddresses\": \"52.190.24.128,52.190.24.176,52.190.26.51,52.190.26.67,52.190.26.86,52.190.26.222\",\r\n \"possibleOutboundIpAddresses\": \"52.191.87.106,52.191.87.107,52.191.87.108,52.191.87.109,52.191.87.110,52.191.87.111,52.191.87.119,52.191.87.120,52.191.87.121,52.191.87.112,52.191.87.113,52.191.87.114,52.191.87.115,52.191.87.116,52.191.87.118,52.190.24.128,52.190.24.176,52.190.26.51,52.190.26.67,52.190.26.86,52.190.26.222,52.190.27.48,52.190.27.146,52.190.28.79,52.190.28.223,52.190.28.240,52.190.30.0\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-blu-177\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": {},\r\n \"resourceGroup\": \"javacsmrg852\",\r\n \"defaultHostName\": \"java-webapp-6280.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null,\r\n \"migrationState\": null\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852/providers/Microsoft.Web/sites/java-webapp-6280?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWMwYWE1ZjctOWU3OC00MGM5LTg1Y2QtNTM1YzYzMDViMzgwL3Jlc291cmNlR3JvdXBzL2phdmFjc21yZzg1Mi9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9qYXZhLXdlYmFwcC02MjgwP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "09a1b7fc-ecf3-4635-8a8c-661e80a47c5a" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29220.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.AppService.Fluent.WebSiteManagementClient/1.0.0.66", + "MacAddressHash/5b986dbc01e2cd9262cdc8765199485ab440ab932e80985aff873a3788750edd" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"1D69DF776AF6F20\"" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2e8302d1-078c-4ac6-86bc-e2c6dd272b8b" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-correlation-request-id": [ + "fa668f5a-0084-4997-9f77-1295bc26016b" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20201009T044900Z:fa668f5a-0084-4997-9f77-1295bc26016b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 09 Oct 2020 04:49:00 GMT" + ], + "Content-Length": [ + "5500" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852/providers/Microsoft.Web/sites/java-webapp-6280\",\r\n \"name\": \"java-webapp-6280\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"East US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"name\": \"java-webapp-6280\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"java-webapp-6280.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"javacsmrg852-EastUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-blu-177.api.azurewebsites.windows.net:454/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/webspaces/javacsmrg852-EastUSwebspace/sites/java-webapp-6280\",\r\n \"repositorySiteName\": \"java-webapp-6280\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"java-webapp-6280.azurewebsites.net\",\r\n \"java-webapp-6280.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"java-webapp-6280.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"java-webapp-6280.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852/providers/Microsoft.Web/serverfarms/java-asp-4143\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-10-09T04:48:42.77\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": {\r\n \"numberOfWorkers\": null,\r\n \"defaultDocuments\": null,\r\n \"netFrameworkVersion\": null,\r\n \"phpVersion\": null,\r\n \"pythonVersion\": null,\r\n \"nodeVersion\": null,\r\n \"powerShellVersion\": null,\r\n \"linuxFxVersion\": null,\r\n \"windowsFxVersion\": null,\r\n \"requestTracingEnabled\": null,\r\n \"remoteDebuggingEnabled\": null,\r\n \"remoteDebuggingVersion\": null,\r\n \"httpLoggingEnabled\": null,\r\n \"azureMonitorLogCategories\": null,\r\n \"acrUseManagedIdentityCreds\": false,\r\n \"acrUserManagedIdentityID\": null,\r\n \"logsDirectorySizeLimit\": null,\r\n \"detailedErrorLoggingEnabled\": null,\r\n \"publishingUsername\": null,\r\n \"publishingPassword\": null,\r\n \"appSettings\": null,\r\n \"azureStorageAccounts\": null,\r\n \"metadata\": null,\r\n \"connectionStrings\": null,\r\n \"machineKey\": null,\r\n \"handlerMappings\": null,\r\n \"documentRoot\": null,\r\n \"scmType\": null,\r\n \"use32BitWorkerProcess\": null,\r\n \"webSocketsEnabled\": null,\r\n \"alwaysOn\": null,\r\n \"javaVersion\": null,\r\n \"javaContainer\": null,\r\n \"javaContainerVersion\": null,\r\n \"appCommandLine\": null,\r\n \"managedPipelineMode\": null,\r\n \"virtualApplications\": null,\r\n \"winAuthAdminState\": null,\r\n \"winAuthTenantState\": null,\r\n \"customAppPoolIdentityAdminState\": null,\r\n \"customAppPoolIdentityTenantState\": null,\r\n \"runtimeADUser\": null,\r\n \"runtimeADUserPassword\": null,\r\n \"loadBalancing\": null,\r\n \"routingRules\": null,\r\n \"experiments\": null,\r\n \"limits\": null,\r\n \"autoHealEnabled\": null,\r\n \"autoHealRules\": null,\r\n \"tracingOptions\": null,\r\n \"vnetName\": null,\r\n \"vnetRouteAllEnabled\": null,\r\n \"cors\": null,\r\n \"push\": null,\r\n \"apiDefinition\": null,\r\n \"apiManagementConfig\": null,\r\n \"autoSwapSlotName\": null,\r\n \"localMySqlEnabled\": null,\r\n \"managedServiceIdentityId\": null,\r\n \"xManagedServiceIdentityId\": null,\r\n \"ipSecurityRestrictions\": null,\r\n \"scmIpSecurityRestrictions\": null,\r\n \"scmIpSecurityRestrictionsUseMain\": null,\r\n \"http20Enabled\": null,\r\n \"minTlsVersion\": null,\r\n \"scmMinTlsVersion\": null,\r\n \"ftpsState\": null,\r\n \"preWarmedInstanceCount\": null,\r\n \"functionAppScaleLimit\": null,\r\n \"healthCheckPath\": null,\r\n \"fileChangeAuditEnabled\": null,\r\n \"functionsRuntimeScaleMonitoringEnabled\": null,\r\n \"websiteTimeZone\": null,\r\n \"minimumElasticInstanceCount\": 0\r\n },\r\n \"deploymentId\": \"java-webapp-6280\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"PremiumV3\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertMode\": \"Required\",\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"20.49.104.0\",\r\n \"possibleInboundIpAddresses\": \"20.49.104.0\",\r\n \"ftpUsername\": \"java-webapp-6280\\\\$java-webapp-6280\",\r\n \"ftpsHostName\": \"ftps://waws-prod-blu-177.ftp.azurewebsites.windows.net/site/wwwroot\",\r\n \"outboundIpAddresses\": \"52.190.24.128,52.190.24.176,52.190.26.51,52.190.26.67,52.190.26.86,52.190.26.222\",\r\n \"possibleOutboundIpAddresses\": \"52.191.87.106,52.191.87.107,52.191.87.108,52.191.87.109,52.191.87.110,52.191.87.111,52.191.87.119,52.191.87.120,52.191.87.121,52.191.87.112,52.191.87.113,52.191.87.114,52.191.87.115,52.191.87.116,52.191.87.118,52.190.24.128,52.190.24.176,52.190.26.51,52.190.26.67,52.190.26.86,52.190.26.222,52.190.27.48,52.190.27.146,52.190.28.79,52.190.28.223,52.190.28.240,52.190.30.0\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-blu-177\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": {},\r\n \"resourceGroup\": \"javacsmrg852\",\r\n \"defaultHostName\": \"java-webapp-6280.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": [],\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null,\r\n \"migrationState\": null\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852/providers/Microsoft.Web/sites/java-webapp-6280?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWMwYWE1ZjctOWU3OC00MGM5LTg1Y2QtNTM1YzYzMDViMzgwL3Jlc291cmNlR3JvdXBzL2phdmFjc21yZzg1Mi9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9qYXZhLXdlYmFwcC02MjgwP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e2f6c192-954b-4a58-b6aa-92ff5974172a" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29220.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.AppService.Fluent.WebSiteManagementClient/1.0.0.66", + "MacAddressHash/5b986dbc01e2cd9262cdc8765199485ab440ab932e80985aff873a3788750edd" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"1D69DF78303F80B\"" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6edfcd18-cf76-4444-b637-781e760b64eb" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-correlation-request-id": [ + "e30e6557-d37e-4d85-9545-a57526a80372" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20201009T044904Z:e30e6557-d37e-4d85-9545-a57526a80372" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 09 Oct 2020 04:49:04 GMT" + ], + "Content-Length": [ + "5577" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852/providers/Microsoft.Web/sites/java-webapp-6280\",\r\n \"name\": \"java-webapp-6280\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"East US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"name\": \"java-webapp-6280\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"java-webapp-6280.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"javacsmrg852-EastUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-blu-177.api.azurewebsites.windows.net:454/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/webspaces/javacsmrg852-EastUSwebspace/sites/java-webapp-6280\",\r\n \"repositorySiteName\": \"java-webapp-6280\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"java-webapp-6280.azurewebsites.net\",\r\n \"java-webapp-6280.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": \"DOCKER|mcr.microsoft.com/azure-app-service/samples/aspnethelloworld:latest\"\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"java-webapp-6280.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"java-webapp-6280.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852/providers/Microsoft.Web/serverfarms/java-asp-4143\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-10-09T04:49:03.4566667\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": {\r\n \"numberOfWorkers\": null,\r\n \"defaultDocuments\": null,\r\n \"netFrameworkVersion\": null,\r\n \"phpVersion\": null,\r\n \"pythonVersion\": null,\r\n \"nodeVersion\": null,\r\n \"powerShellVersion\": null,\r\n \"linuxFxVersion\": null,\r\n \"windowsFxVersion\": null,\r\n \"requestTracingEnabled\": null,\r\n \"remoteDebuggingEnabled\": null,\r\n \"remoteDebuggingVersion\": null,\r\n \"httpLoggingEnabled\": null,\r\n \"azureMonitorLogCategories\": null,\r\n \"acrUseManagedIdentityCreds\": false,\r\n \"acrUserManagedIdentityID\": null,\r\n \"logsDirectorySizeLimit\": null,\r\n \"detailedErrorLoggingEnabled\": null,\r\n \"publishingUsername\": null,\r\n \"publishingPassword\": null,\r\n \"appSettings\": null,\r\n \"azureStorageAccounts\": null,\r\n \"metadata\": null,\r\n \"connectionStrings\": null,\r\n \"machineKey\": null,\r\n \"handlerMappings\": null,\r\n \"documentRoot\": null,\r\n \"scmType\": null,\r\n \"use32BitWorkerProcess\": null,\r\n \"webSocketsEnabled\": null,\r\n \"alwaysOn\": null,\r\n \"javaVersion\": null,\r\n \"javaContainer\": null,\r\n \"javaContainerVersion\": null,\r\n \"appCommandLine\": null,\r\n \"managedPipelineMode\": null,\r\n \"virtualApplications\": null,\r\n \"winAuthAdminState\": null,\r\n \"winAuthTenantState\": null,\r\n \"customAppPoolIdentityAdminState\": null,\r\n \"customAppPoolIdentityTenantState\": null,\r\n \"runtimeADUser\": null,\r\n \"runtimeADUserPassword\": null,\r\n \"loadBalancing\": null,\r\n \"routingRules\": null,\r\n \"experiments\": null,\r\n \"limits\": null,\r\n \"autoHealEnabled\": null,\r\n \"autoHealRules\": null,\r\n \"tracingOptions\": null,\r\n \"vnetName\": null,\r\n \"vnetRouteAllEnabled\": null,\r\n \"cors\": null,\r\n \"push\": null,\r\n \"apiDefinition\": null,\r\n \"apiManagementConfig\": null,\r\n \"autoSwapSlotName\": null,\r\n \"localMySqlEnabled\": null,\r\n \"managedServiceIdentityId\": null,\r\n \"xManagedServiceIdentityId\": null,\r\n \"ipSecurityRestrictions\": null,\r\n \"scmIpSecurityRestrictions\": null,\r\n \"scmIpSecurityRestrictionsUseMain\": null,\r\n \"http20Enabled\": null,\r\n \"minTlsVersion\": null,\r\n \"scmMinTlsVersion\": null,\r\n \"ftpsState\": null,\r\n \"preWarmedInstanceCount\": null,\r\n \"functionAppScaleLimit\": null,\r\n \"healthCheckPath\": null,\r\n \"fileChangeAuditEnabled\": null,\r\n \"functionsRuntimeScaleMonitoringEnabled\": null,\r\n \"websiteTimeZone\": null,\r\n \"minimumElasticInstanceCount\": 0\r\n },\r\n \"deploymentId\": \"java-webapp-6280\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"PremiumV3\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertMode\": \"Required\",\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"20.49.104.0\",\r\n \"possibleInboundIpAddresses\": \"20.49.104.0\",\r\n \"ftpUsername\": \"java-webapp-6280\\\\$java-webapp-6280\",\r\n \"ftpsHostName\": \"ftps://waws-prod-blu-177.ftp.azurewebsites.windows.net/site/wwwroot\",\r\n \"outboundIpAddresses\": \"52.190.24.128,52.190.24.176,52.190.26.51,52.190.26.67,52.190.26.86,52.190.26.222\",\r\n \"possibleOutboundIpAddresses\": \"52.191.87.106,52.191.87.107,52.191.87.108,52.191.87.109,52.191.87.110,52.191.87.111,52.191.87.119,52.191.87.120,52.191.87.121,52.191.87.112,52.191.87.113,52.191.87.114,52.191.87.115,52.191.87.116,52.191.87.118,52.190.24.128,52.190.24.176,52.190.26.51,52.190.26.67,52.190.26.86,52.190.26.222,52.190.27.48,52.190.27.146,52.190.28.79,52.190.28.223,52.190.28.240,52.190.30.0\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-blu-177\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": {},\r\n \"resourceGroup\": \"javacsmrg852\",\r\n \"defaultHostName\": \"java-webapp-6280.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": [],\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null,\r\n \"migrationState\": null\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852/providers/Microsoft.Web/sites/java-webapp-6280/config/web?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWMwYWE1ZjctOWU3OC00MGM5LTg1Y2QtNTM1YzYzMDViMzgwL3Jlc291cmNlR3JvdXBzL2phdmFjc21yZzg1Mi9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9qYXZhLXdlYmFwcC02MjgwL2NvbmZpZy93ZWI/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"windowsFxVersion\": \"DOCKER|mcr.microsoft.com/azure-app-service/samples/aspnethelloworld:latest\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "19030666-08f0-4fb9-8e7a-48820af09147" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29220.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.AppService.Fluent.WebSiteManagementClient/1.0.0.66", + "MacAddressHash/5b986dbc01e2cd9262cdc8765199485ab440ab932e80985aff873a3788750edd" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "130" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"1D69DF776AF6F20\"" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a4c1e8d6-2a75-4d16-a424-1a18e20ace3a" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "0db6c46d-a90a-4f18-bbd8-81054d391a4b" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20201009T044902Z:0db6c46d-a90a-4f18-bbd8-81054d391a4b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 09 Oct 2020 04:49:01 GMT" + ], + "Content-Length": [ + "3622" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852/providers/Microsoft.Web/sites/java-webapp-6280\",\r\n \"name\": \"java-webapp-6280\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"East US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"numberOfWorkers\": 1,\r\n \"defaultDocuments\": [\r\n \"Default.htm\",\r\n \"Default.html\",\r\n \"Default.asp\",\r\n \"index.htm\",\r\n \"index.html\",\r\n \"iisstart.htm\",\r\n \"default.aspx\",\r\n \"index.php\",\r\n \"hostingstart.html\"\r\n ],\r\n \"netFrameworkVersion\": \"v4.0\",\r\n \"phpVersion\": \"5.6\",\r\n \"pythonVersion\": \"\",\r\n \"nodeVersion\": \"\",\r\n \"powerShellVersion\": \"\",\r\n \"linuxFxVersion\": \"\",\r\n \"windowsFxVersion\": \"DOCKER|mcr.microsoft.com/azure-app-service/samples/aspnethelloworld:latest\",\r\n \"requestTracingEnabled\": false,\r\n \"remoteDebuggingEnabled\": false,\r\n \"remoteDebuggingVersion\": null,\r\n \"httpLoggingEnabled\": false,\r\n \"azureMonitorLogCategories\": null,\r\n \"acrUseManagedIdentityCreds\": false,\r\n \"acrUserManagedIdentityID\": null,\r\n \"logsDirectorySizeLimit\": 35,\r\n \"detailedErrorLoggingEnabled\": false,\r\n \"publishingUsername\": \"$java-webapp-6280\",\r\n \"publishingPassword\": null,\r\n \"appSettings\": null,\r\n \"azureStorageAccounts\": {},\r\n \"metadata\": null,\r\n \"connectionStrings\": null,\r\n \"machineKey\": null,\r\n \"handlerMappings\": null,\r\n \"documentRoot\": null,\r\n \"scmType\": \"None\",\r\n \"use32BitWorkerProcess\": true,\r\n \"webSocketsEnabled\": false,\r\n \"alwaysOn\": false,\r\n \"javaVersion\": null,\r\n \"javaContainer\": null,\r\n \"javaContainerVersion\": null,\r\n \"appCommandLine\": \"\",\r\n \"managedPipelineMode\": \"Integrated\",\r\n \"virtualApplications\": [\r\n {\r\n \"virtualPath\": \"/\",\r\n \"physicalPath\": \"site\\\\wwwroot\",\r\n \"preloadEnabled\": false,\r\n \"virtualDirectories\": null\r\n }\r\n ],\r\n \"winAuthAdminState\": 0,\r\n \"winAuthTenantState\": 0,\r\n \"customAppPoolIdentityAdminState\": false,\r\n \"customAppPoolIdentityTenantState\": false,\r\n \"runtimeADUser\": null,\r\n \"runtimeADUserPassword\": null,\r\n \"loadBalancing\": \"LeastRequests\",\r\n \"routingRules\": [],\r\n \"experiments\": {\r\n \"rampUpRules\": []\r\n },\r\n \"limits\": null,\r\n \"autoHealEnabled\": false,\r\n \"autoHealRules\": null,\r\n \"tracingOptions\": null,\r\n \"vnetName\": \"\",\r\n \"vnetRouteAllEnabled\": false,\r\n \"siteAuthEnabled\": false,\r\n \"siteAuthSettings\": {\r\n \"enabled\": null,\r\n \"unauthenticatedClientAction\": null,\r\n \"tokenStoreEnabled\": null,\r\n \"allowedExternalRedirectUrls\": null,\r\n \"defaultProvider\": null,\r\n \"clientId\": null,\r\n \"clientSecret\": null,\r\n \"clientSecretSettingName\": null,\r\n \"clientSecretCertificateThumbprint\": null,\r\n \"issuer\": null,\r\n \"allowedAudiences\": null,\r\n \"additionalLoginParams\": null,\r\n \"isAadAutoProvisioned\": false,\r\n \"aadClaimsAuthorization\": null,\r\n \"googleClientId\": null,\r\n \"googleClientSecret\": null,\r\n \"googleClientSecretSettingName\": null,\r\n \"googleOAuthScopes\": null,\r\n \"facebookAppId\": null,\r\n \"facebookAppSecret\": null,\r\n \"facebookAppSecretSettingName\": null,\r\n \"facebookOAuthScopes\": null,\r\n \"gitHubClientId\": null,\r\n \"gitHubClientSecret\": null,\r\n \"gitHubClientSecretSettingName\": null,\r\n \"gitHubOAuthScopes\": null,\r\n \"twitterConsumerKey\": null,\r\n \"twitterConsumerSecret\": null,\r\n \"twitterConsumerSecretSettingName\": null,\r\n \"microsoftAccountClientId\": null,\r\n \"microsoftAccountClientSecret\": null,\r\n \"microsoftAccountClientSecretSettingName\": null,\r\n \"microsoftAccountOAuthScopes\": null\r\n },\r\n \"cors\": null,\r\n \"push\": null,\r\n \"apiDefinition\": null,\r\n \"apiManagementConfig\": null,\r\n \"autoSwapSlotName\": null,\r\n \"localMySqlEnabled\": false,\r\n \"managedServiceIdentityId\": null,\r\n \"xManagedServiceIdentityId\": null,\r\n \"ipSecurityRestrictions\": [\r\n {\r\n \"ipAddress\": \"Any\",\r\n \"action\": \"Allow\",\r\n \"priority\": 1,\r\n \"name\": \"Allow all\",\r\n \"description\": \"Allow all access\"\r\n }\r\n ],\r\n \"scmIpSecurityRestrictions\": [\r\n {\r\n \"ipAddress\": \"Any\",\r\n \"action\": \"Allow\",\r\n \"priority\": 1,\r\n \"name\": \"Allow all\",\r\n \"description\": \"Allow all access\"\r\n }\r\n ],\r\n \"scmIpSecurityRestrictionsUseMain\": false,\r\n \"http20Enabled\": false,\r\n \"minTlsVersion\": \"1.2\",\r\n \"scmMinTlsVersion\": \"1.0\",\r\n \"ftpsState\": \"AllAllowed\",\r\n \"preWarmedInstanceCount\": 0,\r\n \"functionAppScaleLimit\": 0,\r\n \"healthCheckPath\": null,\r\n \"fileChangeAuditEnabled\": false,\r\n \"functionsRuntimeScaleMonitoringEnabled\": false,\r\n \"websiteTimeZone\": null,\r\n \"minimumElasticInstanceCount\": 0\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852/providers/Microsoft.Web/sites/java-webapp-6280/config/appsettings/list?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWMwYWE1ZjctOWU3OC00MGM5LTg1Y2QtNTM1YzYzMDViMzgwL3Jlc291cmNlR3JvdXBzL2phdmFjc21yZzg1Mi9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9qYXZhLXdlYmFwcC02MjgwL2NvbmZpZy9hcHBzZXR0aW5ncy9saXN0P2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5e3cffdd-f196-4585-b2b4-2a70934107a7" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29220.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.AppService.Fluent.WebSiteManagementClient/1.0.0.66", + "MacAddressHash/5b986dbc01e2cd9262cdc8765199485ab440ab932e80985aff873a3788750edd" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ff6bd16f-93b3-42e4-bd05-4e458522a556" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ + "11999" + ], + "x-ms-correlation-request-id": [ + "eee6f88d-04ce-4a71-825a-66912b45b116" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20201009T044902Z:eee6f88d-04ce-4a71-825a-66912b45b116" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 09 Oct 2020 04:49:02 GMT" + ], + "Content-Length": [ + "296" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852/providers/Microsoft.Web/sites/java-webapp-6280/config/appsettings\",\r\n \"name\": \"appsettings\",\r\n \"type\": \"Microsoft.Web/sites/config\",\r\n \"location\": \"East US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"WEBSITE_NODE_DEFAULT_VERSION\": \"6.9.1\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852/providers/Microsoft.Web/sites/java-webapp-6280/config/appsettings?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWMwYWE1ZjctOWU3OC00MGM5LTg1Y2QtNTM1YzYzMDViMzgwL3Jlc291cmNlR3JvdXBzL2phdmFjc21yZzg1Mi9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9qYXZhLXdlYmFwcC02MjgwL2NvbmZpZy9hcHBzZXR0aW5ncz9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"WEBSITE_NODE_DEFAULT_VERSION\": \"6.9.1\",\r\n \"DOCKER_CUSTOM_IMAGE_NAME\": \"mcr.microsoft.com/azure-app-service/samples/aspnethelloworld:latest\"\r\n },\r\n \"location\": \"East US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c2197468-3bc5-4c78-8a57-34c5d8208f9d" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29220.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.AppService.Fluent.WebSiteManagementClient/1.0.0.66", + "MacAddressHash/5b986dbc01e2cd9262cdc8765199485ab440ab932e80985aff873a3788750edd" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "218" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"1D69DF78303F80B\"" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "77cc8503-ed32-4aba-ad24-868c038ac5ac" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "7d073f71-dbb5-48e5-8de1-02d94261531e" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20201009T044903Z:7d073f71-dbb5-48e5-8de1-02d94261531e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 09 Oct 2020 04:49:03 GMT" + ], + "Content-Length": [ + "393" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg852/providers/Microsoft.Web/sites/java-webapp-6280/config/appsettings\",\r\n \"name\": \"appsettings\",\r\n \"type\": \"Microsoft.Web/sites/config\",\r\n \"location\": \"East US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"WEBSITE_NODE_DEFAULT_VERSION\": \"6.9.1\",\r\n \"DOCKER_CUSTOM_IMAGE_NAME\": \"mcr.microsoft.com/azure-app-service/samples/aspnethelloworld:latest\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourcegroups/javacsmrg852?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWMwYWE1ZjctOWU3OC00MGM5LTg1Y2QtNTM1YzYzMDViMzgwL3Jlc291cmNlZ3JvdXBzL2phdmFjc21yZzg1Mj9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "12d664e5-20c4-4b37-9224-ef0a3013f60d" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29220.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.ResourceManager.Fluent.ResourceManagementClient/1.0.0.66", + "MacAddressHash/5b986dbc01e2cd9262cdc8765199485ab440ab932e80985aff873a3788750edd" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc4NTItRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2019-08-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "f8fe5367-701d-4666-97c5-dacd38260585" + ], + "x-ms-correlation-request-id": [ + "f8fe5367-701d-4666-97c5-dacd38260585" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20201009T044910Z:f8fe5367-701d-4666-97c5-dacd38260585" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 09 Oct 2020 04:49:10 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + } + ], + "Names": { + "CanCRUDWebAppWithContainer": [ + "javacsmrg852", + "java-webapp-6280", + "java-asp-4143" + ] + }, + "Variables": { + "ServicePrincipal": "f963607e-882c-4ea1-95b3-0399672aea88", + "AADTenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubscriptionId": "ec0aa5f7-9e78-40c9-85cd-535c6305b380" + } +} \ No newline at end of file diff --git a/Tests/Fluent.Tests/WebApp/WebAppsTests.cs b/Tests/Fluent.Tests/WebApp/WebAppsTests.cs index 370126224..3a1fe8160 100755 --- a/Tests/Fluent.Tests/WebApp/WebAppsTests.cs +++ b/Tests/Fluent.Tests/WebApp/WebAppsTests.cs @@ -156,5 +156,43 @@ public void WebAppWithoutPhp() } } } + + [Fact] + public void CanCRUDWebAppWithContainer() + { + using (var context = FluentMockContext.Start(this.GetType().FullName)) + { + string GroupName1 = TestUtilities.GenerateName("javacsmrg"); + string WebAppName1 = TestUtilities.GenerateName("java-webapp-"); + string AppServicePlanName1 = TestUtilities.GenerateName("java-asp-"); + + var appServiceManager = TestHelper.CreateAppServiceManager(); + + try + { + var appServicePlan = appServiceManager.AppServicePlans + .Define(AppServicePlanName1) + .WithRegion(Region.USEast) // many other regions does not have quota for PremiumP1v3 + .WithNewResourceGroup(GroupName1) + .WithPricingTier(PricingTier.PremiumP1v3) + .WithOperatingSystem(OperatingSystem.Windows) + .Create(); + + var webApp = appServiceManager.WebApps.Define(WebAppName1) + .WithExistingWindowsPlan(appServicePlan) + .WithExistingResourceGroup(GroupName1) + .WithPublicDockerHubImage("mcr.microsoft.com/azure-app-service/samples/aspnethelloworld:latest") + .Create(); + } + finally + { + try + { + TestHelper.CreateResourceManager().ResourceGroups.BeginDeleteByName(GroupName1); + } + catch { } + } + } + } } } \ No newline at end of file diff --git a/src/ResourceManagement/AppService/Domain/InterfaceImpl/WebAppImpl.cs b/src/ResourceManagement/AppService/Domain/InterfaceImpl/WebAppImpl.cs index 84bc70b6f..a0defe0c1 100644 --- a/src/ResourceManagement/AppService/Domain/InterfaceImpl/WebAppImpl.cs +++ b/src/ResourceManagement/AppService/Domain/InterfaceImpl/WebAppImpl.cs @@ -203,7 +203,7 @@ WebApp.Update.IWithCredentials WebApp.Update.IWithDockerContainerImage.WithPriva /// /// Image and optional tag (eg 'image:tag'). /// The next stage of the definition. - WebApp.Definition.IWithCredentials WebApp.Definition.IWithDockerContainerImage.WithPrivateDockerHubImage(string imageAndTag) + WebApp.Definition.IWithCredentials WebApp.Definition.IWithContainerImage.WithPrivateDockerHubImage(string imageAndTag) { return this.WithPrivateDockerHubImage(imageAndTag); } @@ -213,7 +213,7 @@ WebApp.Definition.IWithCredentials WebApp.Definition.IWithDockerContainerImage.W /// /// Image and optional tag (eg 'image:tag'). /// The next stage of the definition. - WebApp.Definition.IWithStartUpCommand WebApp.Definition.IWithDockerContainerImage.WithPublicDockerHubImage(string imageAndTag) + WebApp.Definition.IWithStartUpCommand WebApp.Definition.IWithContainerImage.WithPublicDockerHubImage(string imageAndTag) { return this.WithPublicDockerHubImage(imageAndTag); } @@ -234,7 +234,7 @@ WebApp.Definition.IWithCreate WebApp.Definition.IWithDockerContainerImage.WithBu /// Image and optional tag (eg 'image:tag'). /// The URL to the private registry server. /// The next stage of the definition. - WebApp.Definition.IWithCredentials WebApp.Definition.IWithDockerContainerImage.WithPrivateRegistryImage(string imageAndTag, string serverUrl) + WebApp.Definition.IWithCredentials WebApp.Definition.IWithContainerImage.WithPrivateRegistryImage(string imageAndTag, string serverUrl) { return this.WithPrivateRegistryImage(imageAndTag, serverUrl); } diff --git a/src/ResourceManagement/AppService/Domain/WebApp/Definition/IDefinition.cs b/src/ResourceManagement/AppService/Domain/WebApp/Definition/IDefinition.cs index 4ab100aca..09f716d92 100644 --- a/src/ResourceManagement/AppService/Domain/WebApp/Definition/IDefinition.cs +++ b/src/ResourceManagement/AppService/Domain/WebApp/Definition/IDefinition.cs @@ -127,6 +127,7 @@ public interface IDefinition : Microsoft.Azure.Management.AppService.Fluent.WebApp.Definition.IWithDockerContainerImage, Microsoft.Azure.Management.AppService.Fluent.WebApp.Definition.IWithCredentials, Microsoft.Azure.Management.AppService.Fluent.WebApp.Definition.IWithStartUpCommand, + IWithWindowsRuntimeStack, Microsoft.Azure.Management.AppService.Fluent.WebApp.Definition.IWithCreate { } @@ -226,9 +227,9 @@ public interface INewAppServicePlanWithGroup : } /// - /// A web app definition allowing docker image source to be specified. + /// A web app definition allowing container image source to be specified. /// - public interface IWithDockerContainerImage + public interface IWithContainerImage { /// /// Specifies the docker container image to be one from Docker Hub. @@ -252,6 +253,13 @@ public interface IWithDockerContainerImage /// The next stage of the definition. Microsoft.Azure.Management.AppService.Fluent.WebApp.Definition.IWithCredentials WithPrivateRegistryImage(string imageAndTag, string serverUrl); + } + + /// + /// A web app definition allowing docker image source to be specified. + /// + public interface IWithDockerContainerImage : IWithContainerImage + { /// /// Specifies the docker container image to be a built in one. /// @@ -263,7 +271,7 @@ public interface IWithDockerContainerImage /// /// A web app definition allowing runtime stack on Windows operating system to be specified. /// - public interface IWithWindowsRuntimeStack : IWithCreate + public interface IWithWindowsRuntimeStack : IWithContainerImage, IWithCreate { /// /// Specifies the runtime stack for the web app on Windows operating system. @@ -272,4 +280,4 @@ public interface IWithWindowsRuntimeStack : IWithCreate /// The next stage of the definition. IWithCreate WithRuntimeStack(WebAppRuntimeStack runtimeStack); } -} \ No newline at end of file +} diff --git a/src/ResourceManagement/AppService/PricingTier.cs b/src/ResourceManagement/AppService/PricingTier.cs index 4db1be0bf..d06e41449 100644 --- a/src/ResourceManagement/AppService/PricingTier.cs +++ b/src/ResourceManagement/AppService/PricingTier.cs @@ -23,6 +23,9 @@ public partial class PricingTier public static readonly PricingTier PremiumP1v2 = new PricingTier("PremiumV2", "P1v2"); public static readonly PricingTier PremiumP2v2 = new PricingTier("PremiumV2", "P2v2"); public static readonly PricingTier PremiumP3v2 = new PricingTier("PremiumV2", "P3v2"); + public static readonly PricingTier PremiumP1v3 = new PricingTier("PremiumV3", "P1v3"); + public static readonly PricingTier PremiumP2v3 = new PricingTier("PremiumV3", "P2v3"); + public static readonly PricingTier PremiumP3v3 = new PricingTier("PremiumV3", "P3v3"); public static readonly PricingTier FreeF1 = new PricingTier("Free", "F1"); public static readonly PricingTier SharedD1 = new PricingTier("Shared", "D1"); public static readonly PricingTier ConsumptionY1 = new PricingTier("Dynamic", "Y1"); diff --git a/src/ResourceManagement/AppService/WebAppImpl.cs b/src/ResourceManagement/AppService/WebAppImpl.cs index 9099df26a..4362a49f0 100644 --- a/src/ResourceManagement/AppService/WebAppImpl.cs +++ b/src/ResourceManagement/AppService/WebAppImpl.cs @@ -34,7 +34,6 @@ internal partial class WebAppImpl : WebApp.Update.IUpdate, WebApp.Definition.IExistingWindowsPlanWithGroup, WebApp.Definition.IExistingLinuxPlanWithGroup, - WebApp.Definition.IWithWindowsRuntimeStack, WebApp.Update.IWithAppServicePlan, WebApp.Update.IWithCredentials, WebApp.Update.IWithStartUpCommand @@ -109,13 +108,20 @@ internal override async Task SubmitMetadataAsync(SiteInner site, Canc ///GENMHASH:E73A2BC2090FC3A00E0D2D18D7506D67:BFA1AA102FC308FAD095DF52D3D7C9F1 public WebAppImpl WithPrivateRegistryImage(string imageAndTag, string serverUrl) { - EnsureLinuxPlan(); + //EnsureLinuxPlan(); CleanUpContainerSettings(); if (SiteConfig == null) { SiteConfig = new SiteConfigResourceInner(); } - SiteConfig.LinuxFxVersion = string.Format("DOCKER|{0}", imageAndTag); + if (OperatingSystem() == Fluent.OperatingSystem.Windows) + { + SiteConfig.WindowsFxVersion = string.Format("DOCKER|{0}", imageAndTag); + } + else + { + SiteConfig.LinuxFxVersion = string.Format("DOCKER|{0}", imageAndTag); + } WithAppSetting(SETTING_DOCKER_IMAGE, imageAndTag); WithAppSetting(SETTING_REGISTRY_SERVER, serverUrl); return this; @@ -124,6 +130,10 @@ public WebAppImpl WithPrivateRegistryImage(string imageAndTag, string serverUrl) ///GENMHASH:602C33B7B682DA260F6CBFC17D1C7E12:E4FC04D27E28502A10F31E38E988A897 private void CleanUpContainerSettings() { + if (SiteConfig != null && SiteConfig.WindowsFxVersion != null) + { + SiteConfig.WindowsFxVersion = null; + } if (SiteConfig != null && SiteConfig.LinuxFxVersion != null) { SiteConfig.LinuxFxVersion = null; @@ -165,24 +175,22 @@ public WebAppImpl WithExistingLinuxPlan(IAppServicePlan appServicePlan) ///GENMHASH:D15FB33BB43555A701A8FD43F244B1D9:2B645488043FF9B7C9FE21F5BC901768 public WebAppImpl WithPublicDockerHubImage(string imageAndTag) { - EnsureLinuxPlan(); + //EnsureLinuxPlan(); CleanUpContainerSettings(); if (SiteConfig == null) { SiteConfig = new SiteConfigResourceInner(); } - SiteConfig.LinuxFxVersion = string.Format("DOCKER|{0}", imageAndTag); - WithAppSetting(SETTING_DOCKER_IMAGE, imageAndTag); - return this; - } - - ///GENMHASH:4554623A20A1D1D6CA43597FA7713AD7:DD8E427B2F3E82987E90A2D5CCB5E193 - private void EnsureLinuxPlan() - { - if (Fluent.OperatingSystem.Windows.Equals(OperatingSystem())) + if (OperatingSystem() == Fluent.OperatingSystem.Windows) { - throw new InvalidOperationException("Docker container settings only apply to Linux app service plans."); + SiteConfig.WindowsFxVersion = string.Format("DOCKER|{0}", imageAndTag); } + else + { + SiteConfig.LinuxFxVersion = string.Format("DOCKER|{0}", imageAndTag); + } + WithAppSetting(SETTING_DOCKER_IMAGE, imageAndTag); + return this; } ///GENMHASH:6799EDFB0B008F8C0EB7E07EE71E6B34:9AA0391980CD01ABEA62130DB5348393 @@ -243,7 +251,7 @@ public WebAppImpl WithCredentials(string username, string password) ///GENMHASH:F7734222FF39440A50483317E5DF8156:998FF6187B952D74EE89FFECAAB847A3 public WebAppImpl WithBuiltInImage(RuntimeStack runtimeStack) { - EnsureLinuxPlan(); + //EnsureLinuxPlan(); CleanUpContainerSettings(); if (SiteConfig == null) { SiteConfig = new SiteConfigResourceInner();