Repository: Azure/azure-cli-extensions

Issue:
Application Insights daily data cap cannot be set to fractional number via CLI
## Describe the bug

The daily data cap in Application Insights can be set to a non-integer number (eg. 0.1).   The `az monitor app-insights component billing update` command only allows integer numbers. 

When using `az monitor app-insights component billing show`, the data volume cap is returned as a non-integer number. 

The `billing update` command should be updated to accept fractional numbers to match the behavior of the portal.

**Command Name**
`az monitor app-insights component billing update`
`Extension Name: application-insights. Version: 0.1.8.`

**Errors:**

```
> az monitor app-insights component billing update --app $appName --resource-group $resourceGroup --cap 0.1
az monitor app-insights component billing update: error: argument --cap: invalid int value: '0.1'
```

## To Reproduce:

- `az monitor app-insights component create --app $appName --resource-group $resourceGroup`
- `az monitor app-insights component billing update --app $appName --resource-group $resourceGroup --cap 0.1`

## Expected Behavior

The `--cap` value should accept non-integer numbers.

## Environment Summary
```
Windows-10-10.0.18362-SP0
Python 3.6.6

azure-cli 2.2.0 *

Extensions:
application-insights 0.1.8

```

<!--Please don't remove this:-->
<!--auto-generated-->




Discussion:
add to S172
@ComradeCow Thanks for raising this issue. Let me reproduce and fix it.

Resolving patch:
diff --git a/src/application-insights/azext_applicationinsights/_params.py b/src/application-insights/azext_applicationinsights/_params.py
--- a/src/application-insights/azext_applicationinsights/_params.py
+++ b/src/application-insights/azext_applicationinsights/_params.py
@@ -40,7 +40,7 @@ def load_arguments(self, _):
     with self.argument_context('monitor app-insights component billing') as c:
         c.argument('stop_sending_notification_when_hitting_cap', options_list=['-s', '--stop'], arg_type=get_three_state_flag(),
                    help='Do not send a notification email when the daily data volume cap is met.')
-        c.argument('cap', type=int, help='Daily data volume cap in GB.')
+        c.argument('cap', type=float, help='Daily data volume cap in GB.')
 
     with self.argument_context('monitor app-insights api-key create') as c:
         c.argument('api_key', help='The name of the API key to create.')


Test patch:
diff --git a/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component.yaml b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component.yaml
--- a/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component.yaml
+++ b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component.yaml
@@ -19,15 +19,15 @@ interactions:
       ParameterSetName:
       - --app --location --kind -g --application-type --retention-time
       User-Agent:
-      - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 yulocal msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.7.0
+      - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-applicationinsights/0.2.0
+        Azure-SDK-For-Python AZURECLI/2.9.0
       accept-language:
       - en-US
     method: PUT
     uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2018-05-01-preview
   response:
     body:
-      string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"27001e7c-0000-0700-0000-5edf07a30000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"09212282-19f4-4609-9219-c12ecc73ac20","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"7ee4b5e9-aca5-403e-9ff4-b442d23dd25c","ConnectionString":"InstrumentationKey=7ee4b5e9-aca5-403e-9ff4-b442d23dd25c","Name":"demoApp","CreationDate":"2020-06-09T03:53:07.3140287+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":120,"Retention":"P120D","IngestionMode":"ApplicationInsights","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+      string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"0e00a5d3-0000-0700-0000-5f1004510000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"505303bc-8d82-4dfa-a0e7-f6073134b1c4","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"b9ba9e1c-d660-4fa9-8a61-81220fafb5ad","ConnectionString":"InstrumentationKey=b9ba9e1c-d660-4fa9-8a61-81220fafb5ad","Name":"demoApp","CreationDate":"2020-07-16T07:40:01.4370889+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":120,"Retention":"P120D","IngestionMode":"ApplicationInsights","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
     headers:
       access-control-expose-headers:
       - Request-Context
@@ -38,7 +38,7 @@ interactions:
       content-type:
       - application/json; charset=utf-8
       date:
-      - Tue, 09 Jun 2020 03:53:09 GMT
+      - Thu, 16 Jul 2020 07:40:03 GMT
       expires:
       - '-1'
       pragma:
@@ -56,7 +56,7 @@ interactions:
       x-content-type-options:
       - nosniff
       x-ms-ratelimit-remaining-subscription-writes:
-      - '1198'
+      - '1199'
       x-powered-by:
       - ASP.NET
     status:
@@ -76,15 +76,15 @@ interactions:
       ParameterSetName:
       - --app -g
       User-Agent:
-      - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 yulocal msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.7.0
+      - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-applicationinsights/0.2.0
+        Azure-SDK-For-Python AZURECLI/2.9.0
       accept-language:
       - en-US
     method: GET
     uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp/currentbillingfeatures?api-version=2015-05-01
   response:
     body:
-      string: '{"CurrentBillingFeatures":["Basic"],"DataVolumeCap":{"Cap":100.0,"MaxHistoryCap":1000.0,"ResetTime":0,"WarningThreshold":90,"StopSendNotificationWhenHitThreshold":false,"StopSendNotificationWhenHitCap":false},"EndTime":"2018-04-02T13:00:00+00:00"}'
+      string: '{"CurrentBillingFeatures":["Basic"],"DataVolumeCap":{"Cap":100.0,"MaxHistoryCap":1000.0,"ResetTime":4,"WarningThreshold":90,"StopSendNotificationWhenHitThreshold":false,"StopSendNotificationWhenHitCap":false},"EndTime":"2018-04-02T13:00:00+00:00"}'
     headers:
       access-control-expose-headers:
       - Request-Context
@@ -95,7 +95,7 @@ interactions:
       content-type:
       - application/json; charset=utf-8
       date:
-      - Tue, 09 Jun 2020 03:53:12 GMT
+      - Thu, 16 Jul 2020 07:40:14 GMT
       expires:
       - '-1'
       pragma:
@@ -131,15 +131,15 @@ interactions:
       ParameterSetName:
       - --app -g --cap -s
       User-Agent:
-      - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 yulocal msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.7.0
+      - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-applicationinsights/0.2.0
+        Azure-SDK-For-Python AZURECLI/2.9.0
       accept-language:
       - en-US
     method: GET
     uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp/currentbillingfeatures?api-version=2015-05-01
   response:
     body:
-      string: '{"CurrentBillingFeatures":["Basic"],"DataVolumeCap":{"Cap":100.0,"MaxHistoryCap":1000.0,"ResetTime":0,"WarningThreshold":90,"StopSendNotificationWhenHitThreshold":false,"StopSendNotificationWhenHitCap":false},"EndTime":"2018-04-02T13:00:00+00:00"}'
+      string: '{"CurrentBillingFeatures":["Basic"],"DataVolumeCap":{"Cap":100.0,"MaxHistoryCap":1000.0,"ResetTime":4,"WarningThreshold":90,"StopSendNotificationWhenHitThreshold":false,"StopSendNotificationWhenHitCap":false},"EndTime":"2018-04-02T13:00:00+00:00"}'
     headers:
       access-control-expose-headers:
       - Request-Context
@@ -150,7 +150,7 @@ interactions:
       content-type:
       - application/json; charset=utf-8
       date:
-      - Tue, 09 Jun 2020 03:53:15 GMT
+      - Thu, 16 Jul 2020 07:40:15 GMT
       expires:
       - '-1'
       pragma:
@@ -173,7 +173,7 @@ interactions:
       code: 200
       message: OK
 - request:
-    body: '{"DataVolumeCap": {"Cap": 200.0, "WarningThreshold": 90, "StopSendNotificationWhenHitThreshold":
+    body: '{"DataVolumeCap": {"Cap": 200.5, "WarningThreshold": 90, "StopSendNotificationWhenHitThreshold":
       false, "StopSendNotificationWhenHitCap": true}, "CurrentBillingFeatures": ["Basic"]}'
     headers:
       Accept:
@@ -191,15 +191,15 @@ interactions:
       ParameterSetName:
       - --app -g --cap -s
       User-Agent:
-      - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 yulocal msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.7.0
+      - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-applicationinsights/0.2.0
+        Azure-SDK-For-Python AZURECLI/2.9.0
       accept-language:
       - en-US
     method: PUT
     uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp/currentbillingfeatures?api-version=2015-05-01
   response:
     body:
-      string: '{"CurrentBillingFeatures":["Basic"],"DataVolumeCap":{"Cap":200.0,"MaxHistoryCap":1000.0,"ResetTime":0,"WarningThreshold":90,"StopSendNotificationWhenHitThreshold":false,"StopSendNotificationWhenHitCap":true}}'
+      string: '{"CurrentBillingFeatures":["Basic"],"DataVolumeCap":{"Cap":200.5,"MaxHistoryCap":1000.0,"ResetTime":0,"WarningThreshold":90,"StopSendNotificationWhenHitThreshold":false,"StopSendNotificationWhenHitCap":true}}'
     headers:
       access-control-expose-headers:
       - Request-Context
@@ -210,7 +210,7 @@ interactions:
       content-type:
       - application/json; charset=utf-8
       date:
-      - Tue, 09 Jun 2020 03:53:16 GMT
+      - Thu, 16 Jul 2020 07:40:17 GMT
       expires:
       - '-1'
       pragma:
@@ -248,15 +248,15 @@ interactions:
       ParameterSetName:
       - --app --kind -g --retention-time
       User-Agent:
-      - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 yulocal msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.7.0
+      - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-applicationinsights/0.2.0
+        Azure-SDK-For-Python AZURECLI/2.9.0
       accept-language:
       - en-US
     method: GET
     uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2018-05-01-preview
   response:
     body:
-      string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"27001e7c-0000-0700-0000-5edf07a30000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"09212282-19f4-4609-9219-c12ecc73ac20","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"7ee4b5e9-aca5-403e-9ff4-b442d23dd25c","ConnectionString":"InstrumentationKey=7ee4b5e9-aca5-403e-9ff4-b442d23dd25c","Name":"demoApp","CreationDate":"2020-06-09T03:53:07.3140287+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":120,"Retention":"P120D","IngestionMode":"ApplicationInsights","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+      string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"0e00a5d3-0000-0700-0000-5f1004510000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"505303bc-8d82-4dfa-a0e7-f6073134b1c4","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"b9ba9e1c-d660-4fa9-8a61-81220fafb5ad","ConnectionString":"InstrumentationKey=b9ba9e1c-d660-4fa9-8a61-81220fafb5ad","Name":"demoApp","CreationDate":"2020-07-16T07:40:01.4370889+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":120,"Retention":"P120D","IngestionMode":"ApplicationInsights","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
     headers:
       access-control-expose-headers:
       - Request-Context
@@ -267,7 +267,7 @@ interactions:
       content-type:
       - application/json; charset=utf-8
       date:
-      - Tue, 09 Jun 2020 03:53:18 GMT
+      - Thu, 16 Jul 2020 07:40:18 GMT
       expires:
       - '-1'
       pragma:
@@ -310,15 +310,15 @@ interactions:
       ParameterSetName:
       - --app --kind -g --retention-time
       User-Agent:
-      - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 yulocal msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.7.0
+      - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-applicationinsights/0.2.0
+        Azure-SDK-For-Python AZURECLI/2.9.0
       accept-language:
       - en-US
     method: PUT
     uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2018-05-01-preview
   response:
     body:
-      string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"27004e7c-0000-0700-0000-5edf07af0000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"09212282-19f4-4609-9219-c12ecc73ac20","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"7ee4b5e9-aca5-403e-9ff4-b442d23dd25c","ConnectionString":"InstrumentationKey=7ee4b5e9-aca5-403e-9ff4-b442d23dd25c","Name":"demoApp","CreationDate":"2020-06-09T03:53:07.3140287+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":180,"Retention":"P180D","IngestionMode":"ApplicationInsights","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+      string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"0e0069d4-0000-0700-0000-5f1004640000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"505303bc-8d82-4dfa-a0e7-f6073134b1c4","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"b9ba9e1c-d660-4fa9-8a61-81220fafb5ad","ConnectionString":"InstrumentationKey=b9ba9e1c-d660-4fa9-8a61-81220fafb5ad","Name":"demoApp","CreationDate":"2020-07-16T07:40:01.4370889+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":180,"Retention":"P180D","IngestionMode":"ApplicationInsights","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
     headers:
       access-control-expose-headers:
       - Request-Context
@@ -329,7 +329,7 @@ interactions:
       content-type:
       - application/json; charset=utf-8
       date:
-      - Tue, 09 Jun 2020 03:53:22 GMT
+      - Thu, 16 Jul 2020 07:40:22 GMT
       expires:
       - '-1'
       pragma:
@@ -372,15 +372,15 @@ interactions:
       ParameterSetName:
       - --app --location --kind -g --application-type
       User-Agent:
-      - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 yulocal msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.7.0
+      - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-applicationinsights/0.2.0
+        Azure-SDK-For-Python AZURECLI/2.9.0
       accept-language:
       - en-US
     method: PUT
     uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp?api-version=2018-05-01-preview
   response:
     body:
-      string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp","name":"testApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"27006f7c-0000-0700-0000-5edf07ba0000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"2cdce806-f5ca-46c9-9c22-b9e6d2845afb","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"c045ea6f-c167-4f58-9ff0-a3fac495e514","ConnectionString":"InstrumentationKey=c045ea6f-c167-4f58-9ff0-a3fac495e514","Name":"testApp","CreationDate":"2020-06-09T03:53:30.9274074+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"IngestionMode":"ApplicationInsights","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+      string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp","name":"testApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"0e00c6d4-0000-0700-0000-5f10046c0000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"5bf09b31-6d9a-4a0a-9512-db723d1a012c","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"10894e21-78d6-4f97-8f03-8ebb03e385d3","ConnectionString":"InstrumentationKey=10894e21-78d6-4f97-8f03-8ebb03e385d3","Name":"testApp","CreationDate":"2020-07-16T07:40:28.3353653+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"IngestionMode":"ApplicationInsights","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
     headers:
       access-control-expose-headers:
       - Request-Context
@@ -391,7 +391,7 @@ interactions:
       content-type:
       - application/json; charset=utf-8
       date:
-      - Tue, 09 Jun 2020 03:53:31 GMT
+      - Thu, 16 Jul 2020 07:40:30 GMT
       expires:
       - '-1'
       pragma:
@@ -429,15 +429,15 @@ interactions:
       ParameterSetName:
       - -g
       User-Agent:
-      - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 yulocal msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.7.0
+      - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-applicationinsights/0.2.0
+        Azure-SDK-For-Python AZURECLI/2.9.0
       accept-language:
       - en-US
     method: GET
     uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components?api-version=2018-05-01-preview
   response:
     body:
-      string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"27004e7c-0000-0700-0000-5edf07af0000\"","properties":{"ApplicationId":"demoApp","AppId":"09212282-19f4-4609-9219-c12ecc73ac20","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"7ee4b5e9-aca5-403e-9ff4-b442d23dd25c","ConnectionString":"InstrumentationKey=7ee4b5e9-aca5-403e-9ff4-b442d23dd25c","Name":"demoApp","CreationDate":"2020-06-09T03:53:07.3140287+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":180,"Retention":"P180D","IngestionMode":"ApplicationInsights","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp","name":"testApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"27006f7c-0000-0700-0000-5edf07ba0000\"","properties":{"ApplicationId":"testApp","AppId":"2cdce806-f5ca-46c9-9c22-b9e6d2845afb","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"c045ea6f-c167-4f58-9ff0-a3fac495e514","ConnectionString":"InstrumentationKey=c045ea6f-c167-4f58-9ff0-a3fac495e514","Name":"testApp","CreationDate":"2020-06-09T03:53:30.9274074+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"IngestionMode":"ApplicationInsights","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}]}'
+      string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"0e0069d4-0000-0700-0000-5f1004640000\"","properties":{"ApplicationId":"demoApp","AppId":"505303bc-8d82-4dfa-a0e7-f6073134b1c4","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"b9ba9e1c-d660-4fa9-8a61-81220fafb5ad","ConnectionString":"InstrumentationKey=b9ba9e1c-d660-4fa9-8a61-81220fafb5ad","Name":"demoApp","CreationDate":"2020-07-16T07:40:01.4370889+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":180,"Retention":"P180D","IngestionMode":"ApplicationInsights","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp","name":"testApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"0e00c6d4-0000-0700-0000-5f10046c0000\"","properties":{"ApplicationId":"testApp","AppId":"5bf09b31-6d9a-4a0a-9512-db723d1a012c","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"10894e21-78d6-4f97-8f03-8ebb03e385d3","ConnectionString":"InstrumentationKey=10894e21-78d6-4f97-8f03-8ebb03e385d3","Name":"testApp","CreationDate":"2020-07-16T07:40:28.3353653+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"IngestionMode":"ApplicationInsights","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}]}'
     headers:
       cache-control:
       - no-cache
@@ -446,7 +446,7 @@ interactions:
       content-type:
       - application/json; charset=utf-8
       date:
-      - Tue, 09 Jun 2020 03:53:33 GMT
+      - Thu, 16 Jul 2020 07:40:30 GMT
       expires:
       - '-1'
       pragma:
@@ -458,8 +458,8 @@ interactions:
       x-content-type-options:
       - nosniff
       x-ms-original-request-ids:
-      - c9ba2e14-aa04-11ea-bf06-00155dcc7f5d
-      - c9ba2e14-aa04-11ea-bf06-00155dcc7f5d
+      - 9fdcfaee-c737-11ea-a469-c8d9d2028398
+      - 9fdcfaee-c737-11ea-a469-c8d9d2028398
     status:
       code: 200
       message: OK
@@ -477,26 +477,26 @@ interactions:
       ParameterSetName:
       - -g --app
       User-Agent:
-      - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 yulocal msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.7.0
+      - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-applicationinsights/0.2.0
+        Azure-SDK-For-Python AZURECLI/2.9.0
       accept-language:
       - en-US
     method: GET
     uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp?api-version=2020-02-02-preview
   response:
     body:
-      string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp","name":"testApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"27006f7c-0000-0700-0000-5edf07ba0000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"2cdce806-f5ca-46c9-9c22-b9e6d2845afb","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"c045ea6f-c167-4f58-9ff0-a3fac495e514","Name":"testApp","CreationDate":"2020-06-09T03:53:30.9274074+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"IngestionMode":"ApplicationInsights","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+      string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp","name":"testApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"0e00c6d4-0000-0700-0000-5f10046c0000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"5bf09b31-6d9a-4a0a-9512-db723d1a012c","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"10894e21-78d6-4f97-8f03-8ebb03e385d3","ConnectionString":"InstrumentationKey=10894e21-78d6-4f97-8f03-8ebb03e385d3","Name":"testApp","CreationDate":"2020-07-16T07:40:28.3353653+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"IngestionMode":"ApplicationInsights","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
     headers:
       access-control-expose-headers:
       - Request-Context
       cache-control:
       - no-cache
       content-length:
-      - '899'
+      - '976'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Tue, 09 Jun 2020 03:53:35 GMT
+      - Thu, 16 Jul 2020 07:40:31 GMT
       expires:
       - '-1'
       pragma:
@@ -534,8 +534,8 @@ interactions:
       ParameterSetName:
       - --app -g
       User-Agent:
-      - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 yulocal msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.7.0
+      - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-applicationinsights/0.2.0
+        Azure-SDK-For-Python AZURECLI/2.9.0
       accept-language:
       - en-US
     method: DELETE
@@ -551,7 +551,7 @@ interactions:
       content-length:
       - '0'
       date:
-      - Tue, 09 Jun 2020 03:54:11 GMT
+      - Thu, 16 Jul 2020 07:40:38 GMT
       expires:
       - '-1'
       pragma:
diff --git a/src/application-insights/azext_applicationinsights/tests/latest/test_applicationinsights_mgmt.py b/src/application-insights/azext_applicationinsights/tests/latest/test_applicationinsights_mgmt.py
--- a/src/application-insights/azext_applicationinsights/tests/latest/test_applicationinsights_mgmt.py
+++ b/src/application-insights/azext_applicationinsights/tests/latest/test_applicationinsights_mgmt.py
@@ -35,8 +35,8 @@ def test_component(self, resource_group, location):
             self.check("contains(keys(@), 'dataVolumeCap')", True)
         ])
 
-        self.cmd('monitor app-insights component billing update --app {name_a} -g {resource_group} --cap 200 -s', checks=[
-            self.check('dataVolumeCap.cap', 200),
+        self.cmd('monitor app-insights component billing update --app {name_a} -g {resource_group} --cap 200.5 -s', checks=[
+            self.check('dataVolumeCap.cap', 200.5),
             self.check('dataVolumeCap.stopSendNotificationWhenHitCap', True),
         ])