diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst index bdfede1f364..a4ecf419ea9 100644 --- a/src/azure-cli/HISTORY.rst +++ b/src/azure-cli/HISTORY.rst @@ -24,6 +24,7 @@ Release History **AppService** * Azure Stack: surface commands under the profile of 2019-03-01-hybrid +* functionapp: Add ability to create Java function apps in Linux **ARM** diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_constants.py b/src/azure-cli/azure/cli/command_modules/appservice/_constants.py index 84a62a3750c..1298ace77b3 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_constants.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_constants.py @@ -22,7 +22,8 @@ RUNTIME_TO_DEFAULT_VERSION = { 'node': '8', 'dotnet': '2', - 'python': '3.6' + 'python': '3.6', + 'java': '8' } RUNTIME_TO_IMAGE_FUNCTIONAPP = { @@ -36,5 +37,8 @@ }, 'dotnet': { '2': 'mcr.microsoft.com/azure-functions/dotnet:2.0-appservice' + }, + 'java': { + '8': 'mcr.microsoft.com/azure-functions/java:2.0-java8-appservice' } } diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_params.py b/src/azure-cli/azure/cli/command_modules/appservice/_params.py index 516f9c375ad..0609bee60cf 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_params.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_params.py @@ -29,7 +29,7 @@ MULTI_CONTAINER_TYPES = ['COMPOSE', 'KUBE'] FTPS_STATE_TYPES = ['AllAllowed', 'FtpsOnly', 'Disabled'] OS_TYPES = ['Windows', 'Linux'] -LINUX_RUNTIMES = ['dotnet', 'node', 'python'] +LINUX_RUNTIMES = ['dotnet', 'node', 'python', 'java'] WINDOWS_RUNTIMES = ['dotnet', 'node', 'java', 'powershell'] ACCESS_RESTRICTION_ACTION_TYPES = ['Allow', 'Deny'] ASE_LOADBALANCER_MODES = ['Internal', 'External'] diff --git a/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_functionapp_consumption_linux_java.yaml b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_functionapp_consumption_linux_java.yaml new file mode 100644 index 00000000000..bf1183f8795 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_functionapp_consumption_linux_java.yaml @@ -0,0 +1,597 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp create + Connection: + - keep-alive + ParameterSetName: + - -g -n -c -s --os-type --runtime + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-web/0.42.0 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions?sku=Dynamic&api-version=2018-02-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/Central + US","name":"Central US","type":"Microsoft.Web/geoRegions","properties":{"name":"Central + US","description":null,"sortOrder":0,"displayName":"Central US","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;DSERIES;LINUX;LINUXDSERIES;ELASTICPREMIUM;LINUXFREE"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/North + Europe","name":"North Europe","type":"Microsoft.Web/geoRegions","properties":{"name":"North + Europe","description":"","sortOrder":1,"displayName":"North Europe","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;DSERIES;LINUX;LINUXDSERIES;XENON;ELASTICPREMIUM;LINUXFREE;ELASTICLINUX;LINUXDYNAMIC"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/West + Europe","name":"West Europe","type":"Microsoft.Web/geoRegions","properties":{"name":"West + Europe","description":null,"sortOrder":2,"displayName":"West Europe","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;LINUX;DSERIES;LINUXDSERIES;XENON;SFCONTAINERS;LINUXDYNAMIC;ELASTICPREMIUM;ELASTICLINUX;LINUXFREE"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/Southeast + Asia","name":"Southeast Asia","type":"Microsoft.Web/geoRegions","properties":{"name":"Southeast + Asia","description":"","sortOrder":3,"displayName":"Southeast Asia","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;LINUX;DSERIES;LINUXDSERIES;XENON;ELASTICPREMIUM;LINUXFREE;ELASTICLINUX;LINUXDYNAMIC"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/East + Asia","name":"East Asia","type":"Microsoft.Web/geoRegions","properties":{"name":"East + Asia","description":null,"sortOrder":4,"displayName":"East Asia","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;LINUX;DSERIES;LINUXDSERIES;SFCONTAINERS;LINUXDYNAMIC;ELASTICPREMIUM;LINUXFREE"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/West + US","name":"West US","type":"Microsoft.Web/geoRegions","properties":{"name":"West + US","description":null,"sortOrder":5,"displayName":"West US","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;LINUX;DSERIES;LINUXDSERIES;XENON;ELASTICPREMIUM;LINUXFREE;ELASTICLINUX;LINUXDYNAMIC"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/East + US","name":"East US","type":"Microsoft.Web/geoRegions","properties":{"name":"East + US","description":null,"sortOrder":6,"displayName":"East US","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;LINUX;DSERIES;FAKEORG;LINUXDSERIES;XENON;SFCONTAINERS;LINUXDYNAMIC;LINUXFREE;ELASTICLINUX;ELASTICPREMIUM"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/Japan + West","name":"Japan West","type":"Microsoft.Web/geoRegions","properties":{"name":"Japan + West","description":null,"sortOrder":7,"displayName":"Japan West","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;LINUX;DSERIES;LINUXDSERIES;ELASTICPREMIUM;LINUXFREE"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/Japan + East","name":"Japan East","type":"Microsoft.Web/geoRegions","properties":{"name":"Japan + East","description":null,"sortOrder":8,"displayName":"Japan East","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;LINUX;DSERIES;LINUXDSERIES;LINUXFREE;ELASTICLINUX;ELASTICPREMIUM"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/East + US 2","name":"East US 2","type":"Microsoft.Web/geoRegions","properties":{"name":"East + US 2","description":"","sortOrder":9,"displayName":"East US 2","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;DSERIES;LINUX;LINUXDSERIES;ELASTICPREMIUM;LINUXFREE;LINUXDYNAMIC"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/North + Central US","name":"North Central US","type":"Microsoft.Web/geoRegions","properties":{"name":"North + Central US","description":null,"sortOrder":10,"displayName":"North Central + US","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;LINUX;DSERIES;LINUXDSERIES;LINUXFREE;ELASTICPREMIUM"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/South + Central US","name":"South Central US","type":"Microsoft.Web/geoRegions","properties":{"name":"South + Central US","description":"","sortOrder":11,"displayName":"South Central US","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;DSERIES;LINUX;LINUXDSERIES;ELASTICPREMIUM;LINUXFREE;LINUXDYNAMIC"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/Brazil + South","name":"Brazil South","type":"Microsoft.Web/geoRegions","properties":{"name":"Brazil + South","description":null,"sortOrder":12,"displayName":"Brazil South","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;LINUX;DSERIES;LINUXDSERIES;LINUXFREE;ELASTICPREMIUM"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/Australia + East","name":"Australia East","type":"Microsoft.Web/geoRegions","properties":{"name":"Australia + East","description":"","sortOrder":13,"displayName":"Australia East","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;LINUX;DSERIES;LINUXDSERIES;XENON;ELASTICPREMIUM;LINUXFREE;LINUXDYNAMIC"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/Australia + Southeast","name":"Australia Southeast","type":"Microsoft.Web/geoRegions","properties":{"name":"Australia + Southeast","description":null,"sortOrder":14,"displayName":"Australia Southeast","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;DSERIES;LINUX;LINUXDSERIES;ELASTICPREMIUM;LINUXFREE;ELASTICLINUX"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/East + Asia (Stage)","name":"East Asia (Stage)","type":"Microsoft.Web/geoRegions","properties":{"name":"East + Asia (Stage)","description":null,"sortOrder":2147483647,"displayName":"East + Asia (Stage)","orgDomain":"MSFTINT;DSERIES;ELASTICPREMIUM;FUNCTIONS;DYNAMIC"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/Central + India","name":"Central India","type":"Microsoft.Web/geoRegions","properties":{"name":"Central + India","description":null,"sortOrder":2147483647,"displayName":"Central India","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;LINUX;DSERIES;LINUXDSERIES"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/West + India","name":"West India","type":"Microsoft.Web/geoRegions","properties":{"name":"West + India","description":null,"sortOrder":2147483647,"displayName":"West India","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;LINUX;DSERIES;LINUXDSERIES;ELASTICPREMIUM"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/South + India","name":"South India","type":"Microsoft.Web/geoRegions","properties":{"name":"South + India","description":null,"sortOrder":2147483647,"displayName":"South India","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;DSERIES;LINUX;LINUXDSERIES;ELASTICPREMIUM"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/Canada + Central","name":"Canada Central","type":"Microsoft.Web/geoRegions","properties":{"name":"Canada + Central","description":null,"sortOrder":2147483647,"displayName":"Canada Central","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;DSERIES;LINUX;LINUXDSERIES;ELASTICPREMIUM;LINUXFREE"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/Canada + East","name":"Canada East","type":"Microsoft.Web/geoRegions","properties":{"name":"Canada + East","description":null,"sortOrder":2147483647,"displayName":"Canada East","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;LINUX;DSERIES;LINUXDSERIES"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/West + Central US","name":"West Central US","type":"Microsoft.Web/geoRegions","properties":{"name":"West + Central US","description":null,"sortOrder":2147483647,"displayName":"West + Central US","orgDomain":"PUBLIC;FUNCTIONS;DYNAMIC;LINUX;DSERIES;LINUXDSERIES"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/West + US 2","name":"West US 2","type":"Microsoft.Web/geoRegions","properties":{"name":"West + US 2","description":null,"sortOrder":2147483647,"displayName":"West US 2","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;LINUX;DSERIES;LINUXDSERIES;LINUXFREE;LINUXDYNAMIC;ELASTICPREMIUM"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/UK + West","name":"UK West","type":"Microsoft.Web/geoRegions","properties":{"name":"UK + West","description":null,"sortOrder":2147483647,"displayName":"UK West","orgDomain":"PUBLIC;MSFTPUBLIC;FUNCTIONS;DYNAMIC;DSERIES;LINUX;LINUXDSERIES;ELASTICPREMIUM"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/UK + South","name":"UK South","type":"Microsoft.Web/geoRegions","properties":{"name":"UK + South","description":null,"sortOrder":2147483647,"displayName":"UK South","orgDomain":"PUBLIC;MSFTPUBLIC;DYNAMIC;DSERIES;LINUX;LINUXDSERIES;LINUXFREE;LINUXDYNAMIC;ELASTICPREMIUM"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/East + US 2 EUAP","name":"East US 2 EUAP","type":"Microsoft.Web/geoRegions","properties":{"name":"East + US 2 EUAP","description":null,"sortOrder":2147483647,"displayName":"East US + 2 EUAP","orgDomain":"EUAP;XENON;DSERIES;ELASTICPREMIUM;FUNCTIONS;DYNAMIC"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/Central + US EUAP","name":"Central US EUAP","type":"Microsoft.Web/geoRegions","properties":{"name":"Central + US EUAP","description":null,"sortOrder":2147483647,"displayName":"Central + US EUAP","orgDomain":"EUAP;LINUX;DSERIES;ELASTICPREMIUM;LINUXFREE;ELASTICLINUX;LINUXDYNAMIC;DYNAMIC"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/Korea + Central","name":"Korea Central","type":"Microsoft.Web/geoRegions","properties":{"name":"Korea + Central","description":null,"sortOrder":2147483647,"displayName":"Korea Central","orgDomain":"PUBLIC;DREAMSPARK;MSFTPUBLIC;FUNCTIONS;DYNAMIC;LINUX;LINUXDSERIES;ELASTICPREMIUM;LINUXFREE;DSERIES"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/France + Central","name":"France Central","type":"Microsoft.Web/geoRegions","properties":{"name":"France + Central","description":null,"sortOrder":2147483647,"displayName":"France Central","orgDomain":"PUBLIC;MSFTPUBLIC;DSERIES;DYNAMIC;LINUX;LINUXDSERIES;ELASTICPREMIUM;LINUXFREE"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/Australia + Central 2","name":"Australia Central 2","type":"Microsoft.Web/geoRegions","properties":{"name":"Australia + Central 2","description":null,"sortOrder":2147483647,"displayName":"Australia + Central 2","orgDomain":"PUBLIC;FUNCTIONS;DYNAMIC;DSERIES;LINUX;LINUXDSERIES;LINUXFREE;ELASTICPREMIUM"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/Australia + Central","name":"Australia Central","type":"Microsoft.Web/geoRegions","properties":{"name":"Australia + Central","description":null,"sortOrder":2147483647,"displayName":"Australia + Central","orgDomain":"PUBLIC;FUNCTIONS;DYNAMIC;DSERIES;LINUX;LINUXDSERIES;LINUXFREE;ELASTICPREMIUM"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/South + Africa North","name":"South Africa North","type":"Microsoft.Web/geoRegions","properties":{"name":"South + Africa North","description":null,"sortOrder":2147483647,"displayName":"South + Africa North","orgDomain":"PUBLIC;MSFTPUBLIC;FUNCTIONS;DYNAMIC;LINUX;LINUXDSERIES;DSERIES"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/geoRegions/Switzerland + North","name":"Switzerland North","type":"Microsoft.Web/geoRegions","properties":{"name":"Switzerland + North","description":null,"sortOrder":2147483647,"displayName":"Switzerland + North","orgDomain":"PUBLIC;DSERIES;FUNCTIONS;DYNAMIC;DSERIES"}}],"nextLink":null,"id":null}' + headers: + cache-control: + - no-cache + content-length: + - '12604' + content-type: + - application/json + date: + - Thu, 09 Jan 2020 19:22:01 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp create + Connection: + - keep-alive + ParameterSetName: + - -g -n -c -s --os-type --runtime + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-storage/7.0.0 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azurecli-functionapp-linux000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2019-06-01 + response: + body: + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azurecli-functionapp-linux000001/providers/Microsoft.Storage/storageAccounts/clitest000002","name":"clitest000002","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2020-01-09T19:21:37.9197300Z"},"blob":{"enabled":true,"lastEnabledTime":"2020-01-09T19:21:37.9197300Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-01-09T19:21:37.8728696Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/","file":"https://clitest000002.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}' + headers: + cache-control: + - no-cache + content-length: + - '1200' + content-type: + - application/json + date: + - Thu, 09 Jan 2020 19:22:02 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp create + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -c -s --os-type --runtime + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-storage/7.0.0 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azurecli-functionapp-linux000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2019-06-01 + response: + body: + string: '{"keys":[{"keyName":"key1","value":"veryFakedStorageAccountKey==","permissions":"FULL"},{"keyName":"key2","value":"veryFakedStorageAccountKey==","permissions":"FULL"}]}' + headers: + cache-control: + - no-cache + content-length: + - '288' + content-type: + - application/json + date: + - Thu, 09 Jan 2020 19:22:02 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: 'b''{"kind": "functionapp,linux", "location": "westus", "properties": {"reserved": + true, "isXenon": false, "hyperV": false, "siteConfig": {"netFrameworkVersion": + "v4.6", "linuxFxVersion": "JAVA|8", "appSettings": [{"name": "FUNCTIONS_WORKER_RUNTIME", + "value": "java"}, {"name": "FUNCTIONS_EXTENSION_VERSION", "value": "~2"}, {"name": + "AzureWebJobsStorage", "value": "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=clitest000002;AccountKey=veryFakedStorageAccountKey=="}, + {"name": "AzureWebJobsDashboard", "value": "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=clitest000002;AccountKey=veryFakedStorageAccountKey=="}, + {"name": "WEBSITE_NODE_DEFAULT_VERSION", "value": "~10"}], "localMySqlEnabled": + false, "http20Enabled": true}, "scmSiteAlsoStopped": false}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp create + Connection: + - keep-alive + Content-Length: + - '953' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n -c -s --os-type --runtime + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-web/0.42.0 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azurecli-functionapp-linux000001/providers/Microsoft.Web/sites/functionapplinuxconsumption000003?api-version=2018-11-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azurecli-functionapp-linux000001/providers/Microsoft.Web/sites/functionapplinuxconsumption000003","name":"functionapplinuxconsumption000003","type":"Microsoft.Web/sites","kind":"functionapp,linux","location":"westus","properties":{"name":"functionapplinuxconsumption000003","state":"Running","hostNames":["functionapplinuxconsumption000003.azurewebsites.net"],"webSpace":"azurecli-functionapp-linux000001-WestUSwebspace","selfLink":"https://waws-prod-bay-063.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/azurecli-functionapp-linux000001-WestUSwebspace/sites/functionapplinuxconsumption000003","repositorySiteName":"functionapplinuxconsumption000003","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"enabledHostNames":["functionapplinuxconsumption000003.azurewebsites.net","functionapplinuxconsumption000003.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[{"name":"LinuxFxVersion","value":"JAVA|8"},{"name":"WindowsFxVersion","value":null}],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"functionapplinuxconsumption000003.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"functionapplinuxconsumption000003.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azurecli-functionapp-linux000001/providers/Microsoft.Web/serverfarms/WestUSLinuxDynamicPlan","reserved":true,"isXenon":false,"hyperV":false,"lastModifiedTimeUtc":"2020-01-09T19:22:10.9333333","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","siteConfig":null,"deploymentId":"functionapplinuxconsumption000003","trafficManagerHostNames":null,"sku":"Dynamic","scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"clientAffinityEnabled":false,"clientCertEnabled":false,"clientCertExclusionPaths":null,"hostNamesDisabled":false,"domainVerificationIdentifiers":null,"customDomainVerificationId":"A108DF56339B0D5A85E77F3A21CB534A9CAD577AABB0A4F860F5D38DE4916612","kind":"functionapp,linux","inboundIpAddress":"13.93.220.109","possibleInboundIpAddresses":"13.93.220.109","outboundIpAddresses":"13.93.220.109,13.93.205.56,52.160.105.227,104.209.45.67,13.91.108.234","possibleOutboundIpAddresses":"13.93.220.109,13.93.205.56,52.160.105.227,104.209.45.67,13.91.108.234,13.93.235.174,52.160.85.43","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-bay-063","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"azurecli-functionapp-linux000001","defaultHostName":"functionapplinuxconsumption000003.azurewebsites.net","slotSwapStatus":null,"httpsOnly":false,"redundancyMode":"None","inProgressOperationId":null,"geoDistributions":null,"privateEndpointConnections":null,"buildVersion":null,"targetBuildVersion":null}}' + headers: + cache-control: + - no-cache + content-length: + - '3816' + content-type: + - application/json + date: + - Thu, 09 Jan 2020 19:22:26 GMT + etag: + - '"1D5C72217B64115"' + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '499' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "kind": "web", "properties": {"Application_Type": + "web"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp create + Connection: + - keep-alive + Content-Length: + - '80' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n -c -s --os-type --runtime + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-applicationinsights/0.1.1 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azurecli-functionapp-linux000001/providers/microsoft.insights/components/functionapplinuxconsumption000003?api-version=2015-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azurecli-functionapp-linux000001/providers/microsoft.insights/components/functionapplinuxconsumption000003","name":"functionapplinuxconsumption000003","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"64001533-0000-0700-0000-5e177d730000\"","properties":{"Ver":"v2","ApplicationId":"functionapplinuxconsumption000003","AppId":"c6535ca6-86ca-4174-8f29-bc533857f589","Application_Type":"web","Flow_Type":null,"Request_Source":null,"InstrumentationKey":"403bb42b-a494-43a0-9444-f01076bd9ad2","ConnectionString":"InstrumentationKey=403bb42b-a494-43a0-9444-f01076bd9ad2","Name":"functionapplinuxconsumption000003","CreationDate":"2020-01-09T19:22:27.9121772+00:00","TenantId":"0043ac27-403a-4a41-85b6-c4751acd3610","provisioningState":"Succeeded","SamplingPercentage":null}}' + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '956' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 09 Jan 2020 19:22:29 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525 + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp create + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -c -s --os-type --runtime + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-web/0.42.0 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azurecli-functionapp-linux000001/providers/Microsoft.Web/sites/functionapplinuxconsumption000003/config/appsettings/list?api-version=2018-11-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azurecli-functionapp-linux000001/providers/Microsoft.Web/sites/functionapplinuxconsumption000003/config/appsettings","name":"appsettings","type":"Microsoft.Web/sites/config","location":"West + US","properties":{"FUNCTIONS_WORKER_RUNTIME":"java","FUNCTIONS_EXTENSION_VERSION":"~2","AzureWebJobsStorage":"DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=clitest000002;AccountKey=veryFakedStorageAccountKey==","AzureWebJobsDashboard":"DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=clitest000002;AccountKey=veryFakedStorageAccountKey==","WEBSITE_NODE_DEFAULT_VERSION":"~10"}}' + headers: + cache-control: + - no-cache + content-length: + - '890' + content-type: + - application/json + date: + - Thu, 09 Jan 2020 19:22:34 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: 'b''{"kind": "", "properties": {"FUNCTIONS_WORKER_RUNTIME": + "java", "FUNCTIONS_EXTENSION_VERSION": "~2", "AzureWebJobsStorage": "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=clitest000002;AccountKey=veryFakedStorageAccountKey==", + "AzureWebJobsDashboard": "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=clitest000002;AccountKey=veryFakedStorageAccountKey==", + "WEBSITE_NODE_DEFAULT_VERSION": "~10", "APPINSIGHTS_INSTRUMENTATIONKEY": "403bb42b-a494-43a0-9444-f01076bd9ad2"}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp create + Connection: + - keep-alive + Content-Length: + - '681' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n -c -s --os-type --runtime + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-web/0.42.0 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azurecli-functionapp-linux000001/providers/Microsoft.Web/sites/functionapplinuxconsumption000003/config/appsettings?api-version=2018-11-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azurecli-functionapp-linux000001/providers/Microsoft.Web/sites/functionapplinuxconsumption000003/config/appsettings","name":"appsettings","type":"Microsoft.Web/sites/config","location":"West + US","properties":{"FUNCTIONS_WORKER_RUNTIME":"java","FUNCTIONS_EXTENSION_VERSION":"~2","AzureWebJobsStorage":"DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=clitest000002;AccountKey=veryFakedStorageAccountKey==","AzureWebJobsDashboard":"DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=clitest000002;AccountKey=veryFakedStorageAccountKey==","WEBSITE_NODE_DEFAULT_VERSION":"~10","APPINSIGHTS_INSTRUMENTATIONKEY":"403bb42b-a494-43a0-9444-f01076bd9ad2"}}' + headers: + cache-control: + - no-cache + content-length: + - '962' + content-type: + - application/json + date: + - Thu, 09 Jan 2020 19:22:35 GMT + etag: + - '"1D5C72225E863A0"' + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp config appsettings list + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-web/0.42.0 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azurecli-functionapp-linux000001/providers/Microsoft.Web/sites/functionapplinuxconsumption000003/config/appsettings/list?api-version=2018-11-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azurecli-functionapp-linux000001/providers/Microsoft.Web/sites/functionapplinuxconsumption000003/config/appsettings","name":"appsettings","type":"Microsoft.Web/sites/config","location":"West + US","properties":{"FUNCTIONS_WORKER_RUNTIME":"java","FUNCTIONS_EXTENSION_VERSION":"~2","AzureWebJobsStorage":"DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=clitest000002;AccountKey=veryFakedStorageAccountKey==","AzureWebJobsDashboard":"DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=clitest000002;AccountKey=veryFakedStorageAccountKey==","WEBSITE_NODE_DEFAULT_VERSION":"~10","APPINSIGHTS_INSTRUMENTATIONKEY":"403bb42b-a494-43a0-9444-f01076bd9ad2"}}' + headers: + cache-control: + - no-cache + content-length: + - '962' + content-type: + - application/json + date: + - Thu, 09 Jan 2020 19:22:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp config appsettings list + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-web/0.42.0 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azurecli-functionapp-linux000001/providers/Microsoft.Web/sites/functionapplinuxconsumption000003/config/slotConfigNames?api-version=2018-11-01 + response: + body: + string: '{"id":null,"name":"functionapplinuxconsumption000003","type":"Microsoft.Web/sites","location":"West + US","properties":{"connectionStringNames":null,"appSettingNames":null,"azureStorageConfigNames":null}}' + headers: + cache-control: + - no-cache + content-length: + - '209' + content-type: + - application/json + date: + - Thu, 09 Jan 2020 19:22:38 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_functionapp_on_linux_app_service_java.yaml b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_functionapp_on_linux_app_service_java.yaml new file mode 100644 index 00000000000..3807b3d1443 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_functionapp_on_linux_app_service_java.yaml @@ -0,0 +1,634 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp plan create + Connection: + - keep-alive + ParameterSetName: + - -g -n --sku --is-linux + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-resource/6.0.0 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2019-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2020-01-09T19:19:57Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 09 Jan 2020 19:20:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "properties": {"perSiteScaling": false, "reserved": + true, "isXenon": false}, "sku": {"name": "S1", "tier": "STANDARD"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp plan create + Connection: + - keep-alive + Content-Length: + - '142' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --sku --is-linux + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-web/0.42.0 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/funcapplinplan000003?api-version=2018-02-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/funcapplinplan000003","name":"funcapplinplan000003","type":"Microsoft.Web/serverfarms","kind":"linux","location":"West + US","properties":{"serverFarmId":4669,"name":"funcapplinplan000003","workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"clitest.rg000001-WestUSwebspace","subscription":"0043ac27-403a-4a41-85b6-c4751acd3610","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":10,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"West + US","perSiteScaling":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"linux","resourceGroup":"clitest.rg000001","reserved":true,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-bay-139_4669","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}' + headers: + cache-control: + - no-cache + content-length: + - '1529' + content-type: + - application/json + date: + - Thu, 09 Jan 2020 19:20:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp create + Connection: + - keep-alive + ParameterSetName: + - -g -n --plan -s --runtime + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-web/0.42.0 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/funcapplinplan000003?api-version=2018-02-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/funcapplinplan000003","name":"funcapplinplan000003","type":"Microsoft.Web/serverfarms","kind":"linux","location":"West + US","properties":{"serverFarmId":4669,"name":"funcapplinplan000003","workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"clitest.rg000001-WestUSwebspace","subscription":"0043ac27-403a-4a41-85b6-c4751acd3610","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":10,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"West + US","perSiteScaling":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"linux","resourceGroup":"clitest.rg000001","reserved":true,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-bay-139_4669","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}' + headers: + cache-control: + - no-cache + content-length: + - '1529' + content-type: + - application/json + date: + - Thu, 09 Jan 2020 19:20:38 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp create + Connection: + - keep-alive + ParameterSetName: + - -g -n --plan -s --runtime + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-storage/7.0.0 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2019-06-01 + response: + body: + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","name":"clitest000002","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2020-01-09T19:20:06.1685912Z"},"blob":{"enabled":true,"lastEnabledTime":"2020-01-09T19:20:06.1685912Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-01-09T19:20:06.1216928Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/","file":"https://clitest000002.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}' + headers: + cache-control: + - no-cache + content-length: + - '1200' + content-type: + - application/json + date: + - Thu, 09 Jan 2020 19:20:39 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp create + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n --plan -s --runtime + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-storage/7.0.0 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2019-06-01 + response: + body: + string: '{"keys":[{"keyName":"key1","value":"veryFakedStorageAccountKey==","permissions":"FULL"},{"keyName":"key2","value":"veryFakedStorageAccountKey==","permissions":"FULL"}]}' + headers: + cache-control: + - no-cache + content-length: + - '288' + content-type: + - application/json + date: + - Thu, 09 Jan 2020 19:20:39 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: 'b''{"kind": "functionapp,linux", "location": "West US", "properties": {"serverFarmId": + "funcapplinplan000003", "reserved": true, "isXenon": false, "hyperV": false, + "siteConfig": {"netFrameworkVersion": "v4.6", "linuxFxVersion": "DOCKER|mcr.microsoft.com/azure-functions/java:2.0-java8-appservice", + "appSettings": [{"name": "FUNCTIONS_WORKER_RUNTIME", "value": "java"}, {"name": + "FUNCTIONS_EXTENSION_VERSION", "value": "~2"}, {"name": "MACHINEKEY_DecryptionKey", + "value": "9FC8FCBD403D709B6E85C3F546B84F4C24C332976CD43670EB8E201E391E41DB"}, + {"name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE", "value": "true"}, {"name": "AzureWebJobsStorage", + "value": "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=clitest000002;AccountKey=veryFakedStorageAccountKey=="}, + {"name": "AzureWebJobsDashboard", "value": "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=clitest000002;AccountKey=veryFakedStorageAccountKey=="}, + {"name": "WEBSITE_NODE_DEFAULT_VERSION", "value": "~10"}], "alwaysOn": true, + "localMySqlEnabled": false, "http20Enabled": true}, "scmSiteAlsoStopped": false}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp create + Connection: + - keep-alive + Content-Length: + - '1257' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --plan -s --runtime + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-web/0.42.0 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/functionapp-linux000004?api-version=2018-11-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/functionapp-linux000004","name":"functionapp-linux000004","type":"Microsoft.Web/sites","kind":"functionapp,linux,container","location":"West + US","properties":{"name":"functionapp-linux000004","state":"Running","hostNames":["functionapp-linux000004.azurewebsites.net"],"webSpace":"clitest.rg000001-WestUSwebspace","selfLink":"https://waws-prod-bay-139.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/clitest.rg000001-WestUSwebspace/sites/functionapp-linux000004","repositorySiteName":"functionapp-linux000004","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"enabledHostNames":["functionapp-linux000004.azurewebsites.net","functionapp-linux000004.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[{"name":"LinuxFxVersion","value":"DOCKER|mcr.microsoft.com/azure-functions/java:2.0-java8-appservice"},{"name":"WindowsFxVersion","value":null}],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"functionapp-linux000004.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"functionapp-linux000004.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/funcapplinplan000003","reserved":true,"isXenon":false,"hyperV":false,"lastModifiedTimeUtc":"2020-01-09T19:20:42.71","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","siteConfig":null,"deploymentId":"functionapp-linux000004","trafficManagerHostNames":null,"sku":"Standard","scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"clientAffinityEnabled":false,"clientCertEnabled":false,"clientCertExclusionPaths":null,"hostNamesDisabled":false,"domainVerificationIdentifiers":null,"customDomainVerificationId":"448788C60433622856703557E0F215E9716B5FD5AE034C94FF2C1AF77129D2F7","kind":"functionapp,linux,container","inboundIpAddress":"40.112.243.7","possibleInboundIpAddresses":"40.112.243.7","outboundIpAddresses":"40.112.243.7,40.118.229.231,13.64.89.216,40.78.16.175,52.160.111.150","possibleOutboundIpAddresses":"40.112.243.7,40.118.229.231,13.64.89.216,40.78.16.175,52.160.111.150,13.64.91.216,13.64.94.144,13.91.124.136,13.91.125.204,40.118.239.192","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-bay-139","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"clitest.rg000001","defaultHostName":"functionapp-linux000004.azurewebsites.net","slotSwapStatus":null,"httpsOnly":false,"redundancyMode":"None","inProgressOperationId":null,"geoDistributions":null,"privateEndpointConnections":null,"buildVersion":null,"targetBuildVersion":null}}' + headers: + cache-control: + - no-cache + content-length: + - '3741' + content-type: + - application/json + date: + - Thu, 09 Jan 2020 19:20:59 GMT + etag: + - '"1D5C721E2E87E35"' + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '499' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"location": "West US", "kind": "web", "properties": {"Application_Type": + "web"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp create + Connection: + - keep-alive + Content-Length: + - '81' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --plan -s --runtime + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-applicationinsights/0.1.1 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/functionapp-linux000004?api-version=2015-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/functionapp-linux000004","name":"functionapp-linux000004","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"64000224-0000-0700-0000-5e177d1d0000\"","properties":{"Ver":"v2","ApplicationId":"functionapp-linux000004","AppId":"1708deb3-5e8a-4c5e-8d1f-4afc046c2059","Application_Type":"web","Flow_Type":null,"Request_Source":null,"InstrumentationKey":"8e7902d1-8b0e-4a30-b64b-b5e2ed90656b","ConnectionString":"InstrumentationKey=8e7902d1-8b0e-4a30-b64b-b5e2ed90656b","Name":"functionapp-linux000004","CreationDate":"2020-01-09T19:21:01.4070952+00:00","TenantId":"0043ac27-403a-4a41-85b6-c4751acd3610","provisioningState":"Succeeded","SamplingPercentage":null}}' + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '892' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 09 Jan 2020 19:21:02 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525 + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp create + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n --plan -s --runtime + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-web/0.42.0 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/functionapp-linux000004/config/appsettings/list?api-version=2018-11-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/functionapp-linux000004/config/appsettings","name":"appsettings","type":"Microsoft.Web/sites/config","location":"West + US","properties":{"FUNCTIONS_WORKER_RUNTIME":"java","FUNCTIONS_EXTENSION_VERSION":"~2","MACHINEKEY_DecryptionKey":"9FC8FCBD403D709B6E85C3F546B84F4C24C332976CD43670EB8E201E391E41DB","WEBSITES_ENABLE_APP_SERVICE_STORAGE":"true","AzureWebJobsStorage":"DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=clitest000002;AccountKey=veryFakedStorageAccountKey==","AzureWebJobsDashboard":"DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=clitest000002;AccountKey=veryFakedStorageAccountKey==","WEBSITE_NODE_DEFAULT_VERSION":"~10"}}' + headers: + cache-control: + - no-cache + content-length: + - '1013' + content-type: + - application/json + date: + - Thu, 09 Jan 2020 19:21:05 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: 'b''{"kind": "", "properties": {"FUNCTIONS_WORKER_RUNTIME": + "java", "FUNCTIONS_EXTENSION_VERSION": "~2", "MACHINEKEY_DecryptionKey": "9FC8FCBD403D709B6E85C3F546B84F4C24C332976CD43670EB8E201E391E41DB", + "WEBSITES_ENABLE_APP_SERVICE_STORAGE": "true", "AzureWebJobsStorage": "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=clitest000002;AccountKey=veryFakedStorageAccountKey==", + "AzureWebJobsDashboard": "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=clitest000002;AccountKey=veryFakedStorageAccountKey==", + "WEBSITE_NODE_DEFAULT_VERSION": "~10", "APPINSIGHTS_INSTRUMENTATIONKEY": "8e7902d1-8b0e-4a30-b64b-b5e2ed90656b"}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp create + Connection: + - keep-alive + Content-Length: + - '824' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --plan -s --runtime + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-web/0.42.0 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/functionapp-linux000004/config/appsettings?api-version=2018-11-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/functionapp-linux000004/config/appsettings","name":"appsettings","type":"Microsoft.Web/sites/config","location":"West + US","properties":{"FUNCTIONS_WORKER_RUNTIME":"java","FUNCTIONS_EXTENSION_VERSION":"~2","MACHINEKEY_DecryptionKey":"9FC8FCBD403D709B6E85C3F546B84F4C24C332976CD43670EB8E201E391E41DB","WEBSITES_ENABLE_APP_SERVICE_STORAGE":"true","AzureWebJobsStorage":"DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=clitest000002;AccountKey=veryFakedStorageAccountKey==","AzureWebJobsDashboard":"DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=clitest000002;AccountKey=veryFakedStorageAccountKey==","WEBSITE_NODE_DEFAULT_VERSION":"~10","APPINSIGHTS_INSTRUMENTATIONKEY":"8e7902d1-8b0e-4a30-b64b-b5e2ed90656b"}}' + headers: + cache-control: + - no-cache + content-length: + - '1085' + content-type: + - application/json + date: + - Thu, 09 Jan 2020 19:21:06 GMT + etag: + - '"1D5C721F0CFDC20"' + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-web/0.42.0 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites?api-version=2018-11-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/functionapp-linux000004","name":"functionapp-linux000004","type":"Microsoft.Web/sites","kind":"functionapp,linux,container","location":"West + US","properties":{"name":"functionapp-linux000004","state":"Running","hostNames":["functionapp-linux000004.azurewebsites.net"],"webSpace":"clitest.rg000001-WestUSwebspace","selfLink":"https://waws-prod-bay-139.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/clitest.rg000001-WestUSwebspace/sites/functionapp-linux000004","repositorySiteName":"functionapp-linux000004","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"enabledHostNames":["functionapp-linux000004.azurewebsites.net","functionapp-linux000004.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[{"name":"LinuxFxVersion","value":"DOCKER|mcr.microsoft.com/azure-functions/java:2.0-java8-appservice"},{"name":"WindowsFxVersion","value":null}],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"functionapp-linux000004.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"functionapp-linux000004.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/funcapplinplan000003","reserved":true,"isXenon":false,"hyperV":false,"lastModifiedTimeUtc":"2020-01-09T19:21:06.53","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","siteConfig":null,"deploymentId":"functionapp-linux000004","trafficManagerHostNames":null,"sku":"Standard","scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"clientAffinityEnabled":false,"clientCertEnabled":false,"clientCertExclusionPaths":null,"hostNamesDisabled":false,"domainVerificationIdentifiers":null,"customDomainVerificationId":"448788C60433622856703557E0F215E9716B5FD5AE034C94FF2C1AF77129D2F7","kind":"functionapp,linux,container","inboundIpAddress":"40.112.243.7","possibleInboundIpAddresses":"40.112.243.7","outboundIpAddresses":"40.112.243.7,40.118.229.231,13.64.89.216,40.78.16.175,52.160.111.150","possibleOutboundIpAddresses":"40.112.243.7,40.118.229.231,13.64.89.216,40.78.16.175,52.160.111.150,13.64.91.216,13.64.94.144,13.91.124.136,13.91.125.204,40.118.239.192","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-bay-139","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"clitest.rg000001","defaultHostName":"functionapp-linux000004.azurewebsites.net","slotSwapStatus":null,"httpsOnly":false,"redundancyMode":"None","inProgressOperationId":null,"geoDistributions":null,"privateEndpointConnections":null,"buildVersion":null,"targetBuildVersion":null}}],"nextLink":null,"id":null}' + headers: + cache-control: + - no-cache + content-length: + - '3779' + content-type: + - application/json + date: + - Thu, 09 Jan 2020 19:21:08 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - functionapp config show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.2 msrest_azure/0.6.2 azure-mgmt-web/0.42.0 + Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/functionapp-linux000004/config/web?api-version=2018-11-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/functionapp-linux000004/config/web","name":"functionapp-linux000004","type":"Microsoft.Web/sites/config","location":"West + US","properties":{"numberOfWorkers":1,"defaultDocuments":["Default.htm","Default.html","Default.asp","index.htm","index.html","iisstart.htm","default.aspx","index.php"],"netFrameworkVersion":"v4.0","phpVersion":"","pythonVersion":"","nodeVersion":"","linuxFxVersion":"DOCKER|mcr.microsoft.com/azure-functions/java:2.0-java8-appservice","windowsFxVersion":null,"requestTracingEnabled":false,"remoteDebuggingEnabled":false,"remoteDebuggingVersion":null,"httpLoggingEnabled":false,"azureMonitorLogCategories":null,"logsDirectorySizeLimit":35,"detailedErrorLoggingEnabled":false,"publishingUsername":"$functionapp-linux000004","publishingPassword":null,"appSettings":null,"metadata":null,"connectionStrings":null,"machineKey":null,"handlerMappings":null,"documentRoot":null,"scmType":"None","use32BitWorkerProcess":true,"webSocketsEnabled":false,"alwaysOn":true,"javaVersion":null,"javaContainer":null,"javaContainerVersion":null,"appCommandLine":"","managedPipelineMode":"Integrated","virtualApplications":[{"virtualPath":"/","physicalPath":"site\\wwwroot","preloadEnabled":true,"virtualDirectories":null}],"winAuthAdminState":0,"winAuthTenantState":0,"customAppPoolIdentityAdminState":false,"customAppPoolIdentityTenantState":false,"runtimeADUser":null,"runtimeADUserPassword":null,"loadBalancing":"LeastRequests","routingRules":[],"experiments":{"rampUpRules":[]},"limits":null,"autoHealEnabled":false,"autoHealRules":null,"tracingOptions":null,"vnetName":"","siteAuthEnabled":false,"siteAuthSettings":{"enabled":null,"unauthenticatedClientAction":null,"tokenStoreEnabled":null,"allowedExternalRedirectUrls":null,"defaultProvider":null,"clientId":null,"clientSecret":null,"clientSecretCertificateThumbprint":null,"issuer":null,"allowedAudiences":null,"additionalLoginParams":null,"isAadAutoProvisioned":false,"googleClientId":null,"googleClientSecret":null,"googleOAuthScopes":null,"facebookAppId":null,"facebookAppSecret":null,"facebookOAuthScopes":null,"twitterConsumerKey":null,"twitterConsumerSecret":null,"microsoftAccountClientId":null,"microsoftAccountClientSecret":null,"microsoftAccountOAuthScopes":null},"cors":{"allowedOrigins":["https://functions.azure.com","https://functions-staging.azure.com","https://functions-next.azure.com"],"supportCredentials":false},"push":null,"apiDefinition":null,"apiManagementConfig":null,"autoSwapSlotName":null,"localMySqlEnabled":false,"managedServiceIdentityId":null,"xManagedServiceIdentityId":null,"ipSecurityRestrictions":[{"ipAddress":"Any","action":"Allow","priority":1,"name":"Allow + all","description":"Allow all access"}],"scmIpSecurityRestrictions":[{"ipAddress":"Any","action":"Allow","priority":1,"name":"Allow + all","description":"Allow all access"}],"scmIpSecurityRestrictionsUseMain":false,"http20Enabled":true,"minTlsVersion":"1.2","ftpsState":"AllAllowed","reservedInstanceCount":0,"preWarmedInstanceCount":null,"healthCheckPath":null,"fileChangeAuditEnabled":false,"functionsRuntimeScaleMonitoringEnabled":false,"websiteTimeZone":null}}' + headers: + cache-control: + - no-cache + content-length: + - '3302' + content-type: + - application/json + date: + - Thu, 09 Jan 2020 19:21:09 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py index dbae4256ee7..93bfea14fb3 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py @@ -1116,6 +1116,29 @@ def test_functionapp_e2e(self, resource_group, resource_group2): self.cmd('functionapp create -g {} -n {} -p {} -s {}'.format(resource_group2, functionapp_name2, plan_id, storage_account_id2)) self.cmd('functionapp delete -g {} -n {}'.format(resource_group, functionapp_name)) + @ResourceGroupPreparer(location='westus') + @StorageAccountPreparer() + def test_functionapp_on_linux_app_service_java(self, resource_group, storage_account): + plan = self.create_random_name(prefix='funcapplinplan', length=24) + functionapp = self.create_random_name(prefix='functionapp-linux', length=24) + self.cmd('functionapp plan create -g {} -n {} --sku S1 --is-linux'.format(resource_group, plan), checks=[ + JMESPathCheck('reserved', True), # this weird field means it is a linux + JMESPathCheck('sku.name', 'S1'), + ]) + self.cmd('functionapp create -g {} -n {} --plan {} -s {} --runtime java' + .format(resource_group, functionapp, plan, storage_account), + checks=[ + JMESPathCheck('name', functionapp) + ]) + result = self.cmd('functionapp list -g {}'.format(resource_group), checks=[ + JMESPathCheck('length([])', 1), + JMESPathCheck('[0].name', functionapp) + ]).get_output_in_json() + self.assertTrue('functionapp,linux' in result[0]['kind']) + + self.cmd('functionapp config show -g {} -n {}'.format(resource_group, functionapp), checks=[ + JMESPathCheck('linuxFxVersion', 'DOCKER|mcr.microsoft.com/azure-functions/java:2.0-java8-appservice')]) + class FunctionUpdatePlan(ScenarioTest): @ResourceGroupPreparer(location='centralus') @@ -1216,7 +1239,21 @@ def test_functionapp_consumption_linux(self, resource_group, storage_account): self.cmd('functionapp config appsettings list -g {} -n {}'.format(resource_group, functionapp_name), checks=[ JMESPathCheck("[?name=='FUNCTIONS_WORKER_RUNTIME'].value|[0]", 'node')]) - self.cmd('functionapp delete -g {} -n {}'.format(resource_group, functionapp_name)) + @ResourceGroupPreparer(name_prefix='azurecli-functionapp-linux', location='westus') + @StorageAccountPreparer() + def test_functionapp_consumption_linux_java(self, resource_group, storage_account): + functionapp_name = self.create_random_name('functionapplinuxconsumption', 40) + + self.cmd('functionapp create -g {} -n {} -c westus -s {} --os-type Linux --runtime java' + .format(resource_group, functionapp_name, storage_account)).assert_with_checks([ + JMESPathCheck('state', 'Running'), + JMESPathCheck('name', functionapp_name), + JMESPathCheck('reserved', True), + JMESPathCheck('kind', 'functionapp,linux'), + JMESPathCheck('hostNames[0]', functionapp_name + '.azurewebsites.net')]) + + self.cmd('functionapp config appsettings list -g {} -n {}'.format(resource_group, functionapp_name), checks=[ + JMESPathCheck("[?name=='FUNCTIONS_WORKER_RUNTIME'].value|[0]", 'java')]) class FunctionAppOnWindowsWithRuntime(ScenarioTest):