Repository: Azure/azure-cli-extensions

Issue:
Set retention time in application-insights
### Extension name (the extension in question)
application-insights

### Description of issue (in as much detail as possible)
There does not seem to be a flag or command to change the default 90 days retention period to something else. Currently we have to fallback to the PowerShell Azure module to set the retention period on the Application Insight resource created with the AZ CLI. It would be preferable to use the CLI.

```powershell
# Install extension
az extension add -n application-insights
# Create the AI resource
az monitor app-insights component create -a $appInsights -l $location -g $rgTelemetry

# All this to change the retention day from default 90:
$retentionInDays = 730 # 730 is the maximum
$aiInstance = Get-AzResource -ResourceGroupName $rgTelemetry -Name $appInsights -ResourceType "microsoft.insights/components"
if($($aiInstance.properties | Get-Member -Name "RetentionInDays" -MemberType Properties))
{
    $aiInstance.properties.RetentionInDays = $retentionInDays 
}
else
{
    $aiInstance.properties | Add-Member -Type NoteProperty -Name "RetentionInDays" -Value $retentionInDays
}

$aiInstance | Set-AzResource -Force
```


Discussion:
add to S171
@jsntcy  Could you take a look?
It also doesn't seem to be anywhere in an exported ARM template which would be the easier way for me.

Resolving patch:
diff --git a/src/application-insights/azext_applicationinsights/_help.py b/src/application-insights/azext_applicationinsights/_help.py
--- a/src/application-insights/azext_applicationinsights/_help.py
+++ b/src/application-insights/azext_applicationinsights/_help.py
@@ -39,7 +39,7 @@
     examples:
       - name: Create a component with kind web and location.
         text: |
-          az monitor app-insights component create --app demoApp --location westus2 --kind web -g demoRg --application-type web
+          az monitor app-insights component create --app demoApp --location westus2 --kind web -g demoRg --application-type web --retention-time 120
 """
 
 helps['monitor app-insights component update'] = """
@@ -52,7 +52,7 @@
     examples:
       - name: Update a component with kind web.
         text: |
-          az monitor app-insights component update --app demoApp -k web -g demoRg
+          az monitor app-insights component update --app demoApp -k web -g demoRg --retention-time 120
 """
 
 helps['monitor app-insights component update-tags'] = """
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
@@ -27,6 +27,7 @@ def load_arguments(self, _):
     with self.argument_context('monitor app-insights component') as c:
         c.argument('workspace_resource_id', options_list=['--workspace'], validator=validate_log_analytic_workspace_name_or_id,
                    help='Name or resource ID of a log analytics workspace')
+        c.argument('retention_in_days', options_list=['--retention-time'], help='Retention in days for Application Insights. The value can be one of the following values: 30,60,90,120,180,270,365,550,730. It can be set only when Application Insights is not connected to a Log Analytics workspace.')
         from .vendored_sdks.mgmt_applicationinsights.models import PublicNetworkAccessType
         c.argument('public_network_access_for_ingestion', options_list=['--ingestion-access'], help='The public network access type for accessing Application Insights ingestion.',
                    arg_type=get_enum_type(PublicNetworkAccessType))
diff --git a/src/application-insights/azext_applicationinsights/custom.py b/src/application-insights/azext_applicationinsights/custom.py
--- a/src/application-insights/azext_applicationinsights/custom.py
+++ b/src/application-insights/azext_applicationinsights/custom.py
@@ -48,15 +48,19 @@ def get_metrics_metadata(cmd, client, application, resource_group_name=None):
 
 def create_or_update_component(cmd, client, application, resource_group_name, location, tags=None,
                                kind="web", application_type='web', workspace_resource_id=None,
-                               public_network_access_for_ingestion=None, public_network_access_for_query=None):
+                               public_network_access_for_ingestion=None, public_network_access_for_query=None, retention_in_days=None):
     # due to service limitation, we have to do such a hack. We must refract the logic later.
     if workspace_resource_id is None:
         from .vendored_sdks.mgmt_applicationinsights.v2018_05_01_preview.models import ApplicationInsightsComponent
         component = ApplicationInsightsComponent(location=location, kind=kind, application_type=application_type, tags=tags,
                                                  public_network_access_for_ingestion=public_network_access_for_ingestion,
-                                                 public_network_access_for_query=public_network_access_for_query)
+                                                 public_network_access_for_query=public_network_access_for_query,
+                                                 retention_in_days=retention_in_days)
         return client.create_or_update(resource_group_name, application, component)
 
+    if retention_in_days is not None:
+        raise CLIError("Retention time can be set only when Application Insights is not connected to a Log Analytics workspace.")
+
     from .vendored_sdks.mgmt_applicationinsights.v2020_02_02_preview.models import ApplicationInsightsComponent
     component = ApplicationInsightsComponent(location=location, kind=kind, application_type=application_type,
                                              tags=tags, workspace_resource_id=workspace_resource_id,
@@ -72,10 +76,11 @@ def create_or_update_component(cmd, client, application, resource_group_name, lo
 
 
 def update_component(cmd, client, application, resource_group_name, kind=None, workspace_resource_id=None,
-                     public_network_access_for_ingestion=None, public_network_access_for_query=None):
+                     public_network_access_for_ingestion=None, public_network_access_for_query=None, retention_in_days=None):
     from ._client_factory import applicationinsights_mgmt_plane_client
-    existing_component = None
     if workspace_resource_id is not None:
+        if retention_in_days is not None:
+            raise CLIError("Retention time can be set only when Application Insights is not connected to a Log Analytics workspace.")
         latest_client = applicationinsights_mgmt_plane_client(cmd.cli_ctx, api_version='2020-02-02-preview').components
         try:
             existing_component = latest_client.get(resource_group_name, application)
@@ -97,6 +102,8 @@ def update_component(cmd, client, application, resource_group_name, kind=None, w
         return client.create_or_update(resource_group_name, application, existing_component)
 
     from .vendored_sdks.mgmt_applicationinsights.v2018_05_01_preview.models import ApplicationInsightsComponent
+    if retention_in_days is not None:
+        existing_component.retention_in_days = retention_in_days
     component = ApplicationInsightsComponent(**(vars(existing_component)))
     return client.create_or_update(resource_group_name, application, component)
 


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
@@ -2,7 +2,7 @@ interactions:
 - request:
     body: '{"location": "westus", "kind": "web", "properties": {"Application_Type":
       "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "RetentionInDays":
-      90}}'
+      120}}'
     headers:
       Accept:
       - application/json
@@ -13,32 +13,32 @@ interactions:
       Connection:
       - keep-alive
       Content-Length:
-      - '155'
+      - '156'
       Content-Type:
       - application/json; charset=utf-8
       ParameterSetName:
-      - --app --location --kind -g --application-type
+      - --app --location --kind -g --application-type --retention-time
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       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":"\"070084f6-0000-0700-0000-5ea256a90000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"a7aa35f1-c96a-4ee9-82a4-eafae4ef2f18","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"d44e4479-7ed7-4798-82b8-b0ff8cdafeb0","ConnectionString":"InstrumentationKey=d44e4479-7ed7-4798-82b8-b0ff8cdafeb0","Name":"demoApp","CreationDate":"2020-04-24T03:02:01.0980307+00:00","TenantId":"114f01e8-de03-454a-ab74-723456e241cb","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","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":"\"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"}}'
     headers:
       access-control-expose-headers:
       - Request-Context
       cache-control:
       - no-cache
       content-length:
-      - '957'
+      - '997'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Fri, 24 Apr 2020 03:02:02 GMT
+      - Tue, 09 Jun 2020 03:53:09 GMT
       expires:
       - '-1'
       pragma:
@@ -76,26 +76,26 @@ interactions:
       ParameterSetName:
       - --app -g
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       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":5,"WarningThreshold":90,"StopSendNotificationWhenHitThreshold":false,"StopSendNotificationWhenHitCap":false},"EndTime":"9999-12-31T23:59:59.9999999+00:00"}'
+      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"}'
     headers:
       access-control-expose-headers:
       - Request-Context
       cache-control:
       - no-cache
       content-length:
-      - '255'
+      - '247'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Fri, 24 Apr 2020 03:02:09 GMT
+      - Tue, 09 Jun 2020 03:53:12 GMT
       expires:
       - '-1'
       pragma:
@@ -131,26 +131,26 @@ interactions:
       ParameterSetName:
       - --app -g --cap -s
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       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":5,"WarningThreshold":90,"StopSendNotificationWhenHitThreshold":false,"StopSendNotificationWhenHitCap":false},"EndTime":"9999-12-31T23:59:59.9999999+00:00"}'
+      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"}'
     headers:
       access-control-expose-headers:
       - Request-Context
       cache-control:
       - no-cache
       content-length:
-      - '255'
+      - '247'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Fri, 24 Apr 2020 03:02:12 GMT
+      - Tue, 09 Jun 2020 03:53:15 GMT
       expires:
       - '-1'
       pragma:
@@ -191,8 +191,8 @@ interactions:
       ParameterSetName:
       - --app -g --cap -s
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       accept-language:
       - en-US
     method: PUT
@@ -210,7 +210,7 @@ interactions:
       content-type:
       - application/json; charset=utf-8
       date:
-      - Fri, 24 Apr 2020 03:02:15 GMT
+      - Tue, 09 Jun 2020 03:53:16 GMT
       expires:
       - '-1'
       pragma:
@@ -228,7 +228,7 @@ interactions:
       x-content-type-options:
       - nosniff
       x-ms-ratelimit-remaining-subscription-writes:
-      - '1198'
+      - '1199'
       x-powered-by:
       - ASP.NET
     status:
@@ -246,28 +246,28 @@ interactions:
       Connection:
       - keep-alive
       ParameterSetName:
-      - --app --kind -g
+      - --app --kind -g --retention-time
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       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":"\"070084f6-0000-0700-0000-5ea256a90000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"a7aa35f1-c96a-4ee9-82a4-eafae4ef2f18","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"d44e4479-7ed7-4798-82b8-b0ff8cdafeb0","ConnectionString":"InstrumentationKey=d44e4479-7ed7-4798-82b8-b0ff8cdafeb0","Name":"demoApp","CreationDate":"2020-04-24T03:02:01.0980307+00:00","TenantId":"114f01e8-de03-454a-ab74-723456e241cb","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","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":"\"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"}}'
     headers:
       access-control-expose-headers:
       - Request-Context
       cache-control:
       - no-cache
       content-length:
-      - '957'
+      - '997'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Fri, 24 Apr 2020 03:02:17 GMT
+      - Tue, 09 Jun 2020 03:53:18 GMT
       expires:
       - '-1'
       pragma:
@@ -292,7 +292,7 @@ interactions:
 - request:
     body: '{"location": "westus", "tags": {}, "kind": "ios", "properties": {"Application_Type":
       "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "RetentionInDays":
-      90, "publicNetworkAccessForIngestion": "Enabled", "publicNetworkAccessForQuery":
+      180, "publicNetworkAccessForIngestion": "Enabled", "publicNetworkAccessForQuery":
       "Enabled"}}'
     headers:
       Accept:
@@ -304,32 +304,32 @@ interactions:
       Connection:
       - keep-alive
       Content-Length:
-      - '255'
+      - '256'
       Content-Type:
       - application/json; charset=utf-8
       ParameterSetName:
-      - --app --kind -g
+      - --app --kind -g --retention-time
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       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":"\"07000ef8-0000-0700-0000-5ea256bc0000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"a7aa35f1-c96a-4ee9-82a4-eafae4ef2f18","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"d44e4479-7ed7-4798-82b8-b0ff8cdafeb0","ConnectionString":"InstrumentationKey=d44e4479-7ed7-4798-82b8-b0ff8cdafeb0","Name":"demoApp","CreationDate":"2020-04-24T03:02:01.0980307+00:00","TenantId":"114f01e8-de03-454a-ab74-723456e241cb","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","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":"\"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"}}'
     headers:
       access-control-expose-headers:
       - Request-Context
       cache-control:
       - no-cache
       content-length:
-      - '957'
+      - '997'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Fri, 24 Apr 2020 03:02:24 GMT
+      - Tue, 09 Jun 2020 03:53:22 GMT
       expires:
       - '-1'
       pragma:
@@ -355,8 +355,7 @@ interactions:
       message: OK
 - request:
     body: '{"location": "westus", "kind": "ios", "properties": {"Application_Type":
-      "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "RetentionInDays":
-      90}}'
+      "web", "Flow_Type": "Bluefield", "Request_Source": "rest"}}'
     headers:
       Accept:
       - application/json
@@ -367,32 +366,32 @@ interactions:
       Connection:
       - keep-alive
       Content-Length:
-      - '155'
+      - '132'
       Content-Type:
       - application/json; charset=utf-8
       ParameterSetName:
       - --app --location --kind -g --application-type
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       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":"\"0700a8f8-0000-0700-0000-5ea256c50000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"132039a5-8267-47d8-994a-1c95b97a2981","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"46097bff-27ec-47a7-80bd-cf87f3a564c6","ConnectionString":"InstrumentationKey=46097bff-27ec-47a7-80bd-cf87f3a564c6","Name":"testApp","CreationDate":"2020-04-24T03:02:29.8415209+00:00","TenantId":"114f01e8-de03-454a-ab74-723456e241cb","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","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":"\"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"}}'
     headers:
       access-control-expose-headers:
       - Request-Context
       cache-control:
       - no-cache
       content-length:
-      - '957'
+      - '976'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Fri, 24 Apr 2020 03:02:31 GMT
+      - Tue, 09 Jun 2020 03:53:31 GMT
       expires:
       - '-1'
       pragma:
@@ -430,24 +429,24 @@ interactions:
       ParameterSetName:
       - -g
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       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":"\"07000ef8-0000-0700-0000-5ea256bc0000\"","properties":{"ApplicationId":"demoApp","AppId":"a7aa35f1-c96a-4ee9-82a4-eafae4ef2f18","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"d44e4479-7ed7-4798-82b8-b0ff8cdafeb0","ConnectionString":"InstrumentationKey=d44e4479-7ed7-4798-82b8-b0ff8cdafeb0","Name":"demoApp","CreationDate":"2020-04-24T03:02:01.0980307+00:00","TenantId":"114f01e8-de03-454a-ab74-723456e241cb","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","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":"\"0700a8f8-0000-0700-0000-5ea256c50000\"","properties":{"ApplicationId":"testApp","AppId":"132039a5-8267-47d8-994a-1c95b97a2981","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"46097bff-27ec-47a7-80bd-cf87f3a564c6","ConnectionString":"InstrumentationKey=46097bff-27ec-47a7-80bd-cf87f3a564c6","Name":"testApp","CreationDate":"2020-04-24T03:02:29.8415209+00:00","TenantId":"114f01e8-de03-454a-ab74-723456e241cb","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","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":"\"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"}}]}'
     headers:
       cache-control:
       - no-cache
       content-length:
-      - '1905'
+      - '1964'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Fri, 24 Apr 2020 03:02:33 GMT
+      - Tue, 09 Jun 2020 03:53:33 GMT
       expires:
       - '-1'
       pragma:
@@ -459,8 +458,8 @@ interactions:
       x-content-type-options:
       - nosniff
       x-ms-original-request-ids:
-      - 0a473797-85d8-11ea-97c5-70bc107e5d50
-      - 0a473797-85d8-11ea-97c5-70bc107e5d50
+      - c9ba2e14-aa04-11ea-bf06-00155dcc7f5d
+      - c9ba2e14-aa04-11ea-bf06-00155dcc7f5d
     status:
       code: 200
       message: OK
@@ -478,78 +477,26 @@ interactions:
       ParameterSetName:
       - -g --app
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       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: '{"error":{"code":"NoRegisteredProviderFound","message":"No registered
-        resource provider found for location ''westus'' and API version ''2020-02-02-preview''
-        for type ''components''. The supported api-versions are ''2014-04-01, 2014-08-01,
-        2014-12-01-preview, 2015-05-01, 2018-05-01-preview''. The supported locations
-        are '', eastus, southcentralus, northeurope, westeurope, southeastasia, westus2,
-        uksouth, canadacentral, centralindia, japaneast, australiaeast, koreacentral,
-        francecentral, centralus, eastus2, eastasia, westus, southafricanorth, northcentralus,
-        brazilsouth, switzerlandnorth, australiasoutheast''."}}'
-    headers:
-      cache-control:
-      - no-cache
-      content-length:
-      - '608'
-      content-type:
-      - application/json; charset=utf-8
-      date:
-      - Fri, 24 Apr 2020 03:02:35 GMT
-      expires:
-      - '-1'
-      pragma:
-      - no-cache
-      strict-transport-security:
-      - max-age=31536000; includeSubDomains
-      x-content-type-options:
-      - nosniff
-      x-ms-failure-cause:
-      - gateway
-    status:
-      code: 400
-      message: Bad Request
-- request:
-    body: null
-    headers:
-      Accept:
-      - application/json
-      Accept-Encoding:
-      - gzip, deflate
-      CommandName:
-      - monitor app-insights component show
-      Connection:
-      - keep-alive
-      ParameterSetName:
-      - -g --app
-      User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.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=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":"\"0700a8f8-0000-0700-0000-5ea256c50000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"132039a5-8267-47d8-994a-1c95b97a2981","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"46097bff-27ec-47a7-80bd-cf87f3a564c6","ConnectionString":"InstrumentationKey=46097bff-27ec-47a7-80bd-cf87f3a564c6","Name":"testApp","CreationDate":"2020-04-24T03:02:29.8415209+00:00","TenantId":"114f01e8-de03-454a-ab74-723456e241cb","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","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":"\"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"}}'
     headers:
       access-control-expose-headers:
       - Request-Context
       cache-control:
       - no-cache
       content-length:
-      - '957'
+      - '899'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Fri, 24 Apr 2020 03:02:36 GMT
+      - Tue, 09 Jun 2020 03:53:35 GMT
       expires:
       - '-1'
       pragma:
@@ -587,8 +534,8 @@ interactions:
       ParameterSetName:
       - --app -g
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       accept-language:
       - en-US
     method: DELETE
@@ -604,7 +551,7 @@ interactions:
       content-length:
       - '0'
       date:
-      - Fri, 24 Apr 2020 03:02:43 GMT
+      - Tue, 09 Jun 2020 03:54:11 GMT
       expires:
       - '-1'
       pragma:
diff --git a/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component_with_linked_workspace.yaml b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component_with_linked_workspace.yaml
--- a/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component_with_linked_workspace.yaml
+++ b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component_with_linked_workspace.yaml
@@ -13,24 +13,24 @@ interactions:
       ParameterSetName:
       - -g -n
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 yulocal msrest_azure/0.6.3
+        azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.7.0
       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-04-27T08:22:57Z"},"properties":{"provisioningState":"Succeeded"}}'
+      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-06-09T07:08:46Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}'
     headers:
       cache-control:
       - no-cache
       content-length:
-      - '428'
+      - '471'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Mon, 27 Apr 2020 08:23:05 GMT
+      - Tue, 09 Jun 2020 07:08:50 GMT
       expires:
       - '-1'
       pragma:
@@ -46,7 +46,7 @@ interactions:
       message: OK
 - request:
     body: '{"location": "westus", "properties": {"sku": {"name": "PerGB2018"}, "retentionInDays":
-      30}}'
+      30, "workspaceCapping": {}}}'
     headers:
       Accept:
       - application/json
@@ -57,14 +57,14 @@ interactions:
       Connection:
       - keep-alive
       Content-Length:
-      - '91'
+      - '115'
       Content-Type:
       - application/json; charset=utf-8
       ParameterSetName:
       - -g -n
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-loganalytics/0.5.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 yulocal msrest_azure/0.6.3
+        azure-mgmt-loganalytics/0.6.0 Azure-SDK-For-Python AZURECLI/2.7.0
       accept-language:
       - en-US
     method: PUT
@@ -72,26 +72,28 @@ interactions:
   response:
     body:
       string: "{\r\n  \"properties\": {\r\n    \"source\": \"Azure\",\r\n    \"customerId\":
-        \"983849b5-158e-40d7-895e-cf64f78eedec\",\r\n    \"provisioningState\": \"Creating\",\r\n
-        \   \"sku\": {\r\n      \"name\": \"pergb2018\",\r\n      \"lastSkuUpdate\":
-        \"Mon, 27 Apr 2020 08:23:12 GMT\"\r\n    },\r\n    \"retentionInDays\": 30,\r\n
-        \   \"features\": {\r\n      \"legacy\": 0,\r\n      \"searchVersion\": 1,\r\n
-        \     \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n    },\r\n
-        \   \"workspaceCapping\": {\r\n      \"dailyQuotaGb\": -1.0,\r\n      \"quotaNextResetTime\":
-        \"Mon, 27 Apr 2020 16:00:00 GMT\",\r\n      \"dataIngestionStatus\": \"RespectQuota\"\r\n
-        \   },\r\n    \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n    \"publicNetworkAccessForQuery\":
-        \"Enabled\"\r\n  },\r\n  \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000002\",\r\n
+        \"4105f725-d6ad-4017-ba33-e1de1b8a1c07\",\r\n    \"provisioningState\": \"Creating\",\r\n
+        \   \"sku\": {\r\n      \"name\": \"pergb2018\",\r\n      \"maxCapacityReservationLevel\":
+        1000,\r\n      \"lastSkuUpdate\": \"Tue, 09 Jun 2020 07:08:57 GMT\"\r\n    },\r\n
+        \   \"retentionInDays\": 30,\r\n    \"features\": {\r\n      \"legacy\": 0,\r\n
+        \     \"searchVersion\": 1,\r\n      \"enableLogAccessUsingOnlyResourcePermissions\":
+        true\r\n    },\r\n    \"workspaceCapping\": {\r\n      \"dailyQuotaGb\": -1.0,\r\n
+        \     \"quotaNextResetTime\": \"Tue, 09 Jun 2020 13:00:00 GMT\",\r\n      \"dataIngestionStatus\":
+        \"RespectQuota\"\r\n    },\r\n    \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n
+        \   \"publicNetworkAccessForQuery\": \"Enabled\",\r\n    \"createdDate\":
+        \"Tue, 09 Jun 2020 07:08:57 GMT\",\r\n    \"modifiedDate\": \"Tue, 09 Jun
+        2020 07:08:57 GMT\"\r\n  },\r\n  \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000002\",\r\n
         \ \"name\": \"clitest000002\",\r\n  \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n
         \ \"location\": \"westus\"\r\n}"
     headers:
       cache-control:
       - no-cache
       content-length:
-      - '1026'
+      - '1177'
       content-type:
       - application/json
       date:
-      - Mon, 27 Apr 2020 08:23:13 GMT
+      - Tue, 09 Jun 2020 07:08:58 GMT
       pragma:
       - no-cache
       server:
@@ -123,33 +125,35 @@ interactions:
       ParameterSetName:
       - -g -n
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-loganalytics/0.5.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 yulocal msrest_azure/0.6.3
+        azure-mgmt-loganalytics/0.6.0 Azure-SDK-For-Python AZURECLI/2.7.0
     method: GET
     uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/clitest000002?api-version=2020-03-01-preview
   response:
     body:
       string: "{\r\n  \"properties\": {\r\n    \"source\": \"Azure\",\r\n    \"customerId\":
-        \"983849b5-158e-40d7-895e-cf64f78eedec\",\r\n    \"provisioningState\": \"Succeeded\",\r\n
-        \   \"sku\": {\r\n      \"name\": \"pergb2018\",\r\n      \"lastSkuUpdate\":
-        \"Mon, 27 Apr 2020 08:23:12 GMT\"\r\n    },\r\n    \"retentionInDays\": 30,\r\n
-        \   \"features\": {\r\n      \"legacy\": 0,\r\n      \"searchVersion\": 1,\r\n
-        \     \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n    },\r\n
-        \   \"workspaceCapping\": {\r\n      \"dailyQuotaGb\": -1.0,\r\n      \"quotaNextResetTime\":
-        \"Mon, 27 Apr 2020 16:00:00 GMT\",\r\n      \"dataIngestionStatus\": \"RespectQuota\"\r\n
-        \   },\r\n    \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n    \"publicNetworkAccessForQuery\":
-        \"Enabled\"\r\n  },\r\n  \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000002\",\r\n
+        \"4105f725-d6ad-4017-ba33-e1de1b8a1c07\",\r\n    \"provisioningState\": \"Succeeded\",\r\n
+        \   \"sku\": {\r\n      \"name\": \"pergb2018\",\r\n      \"maxCapacityReservationLevel\":
+        1000,\r\n      \"lastSkuUpdate\": \"Tue, 09 Jun 2020 07:08:57 GMT\"\r\n    },\r\n
+        \   \"retentionInDays\": 30,\r\n    \"features\": {\r\n      \"legacy\": 0,\r\n
+        \     \"searchVersion\": 1,\r\n      \"enableLogAccessUsingOnlyResourcePermissions\":
+        true\r\n    },\r\n    \"workspaceCapping\": {\r\n      \"dailyQuotaGb\": -1.0,\r\n
+        \     \"quotaNextResetTime\": \"Tue, 09 Jun 2020 13:00:00 GMT\",\r\n      \"dataIngestionStatus\":
+        \"RespectQuota\"\r\n    },\r\n    \"enableFailover\": false,\r\n    \"publicNetworkAccessForIngestion\":
+        \"Enabled\",\r\n    \"publicNetworkAccessForQuery\": \"Enabled\",\r\n    \"createdDate\":
+        \"Tue, 09 Jun 2020 07:08:57 GMT\",\r\n    \"modifiedDate\": \"Tue, 09 Jun
+        2020 07:08:58 GMT\"\r\n  },\r\n  \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000002\",\r\n
         \ \"name\": \"clitest000002\",\r\n  \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n
         \ \"location\": \"westus\"\r\n}"
     headers:
       cache-control:
       - no-cache
       content-length:
-      - '1027'
+      - '1208'
       content-type:
       - application/json
       date:
-      - Mon, 27 Apr 2020 08:23:45 GMT
+      - Tue, 09 Jun 2020 07:09:29 GMT
       pragma:
       - no-cache
       server:
@@ -183,24 +187,24 @@ interactions:
       ParameterSetName:
       - -g -n
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 yulocal msrest_azure/0.6.3
+        azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.7.0
       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-04-27T08:22:57Z"},"properties":{"provisioningState":"Succeeded"}}'
+      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-06-09T07:08:46Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}'
     headers:
       cache-control:
       - no-cache
       content-length:
-      - '428'
+      - '471'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Mon, 27 Apr 2020 08:23:47 GMT
+      - Tue, 09 Jun 2020 07:09:31 GMT
       expires:
       - '-1'
       pragma:
@@ -216,7 +220,7 @@ interactions:
       message: OK
 - request:
     body: '{"location": "westus", "properties": {"sku": {"name": "PerGB2018"}, "retentionInDays":
-      30}}'
+      30, "workspaceCapping": {}}}'
     headers:
       Accept:
       - application/json
@@ -227,14 +231,14 @@ interactions:
       Connection:
       - keep-alive
       Content-Length:
-      - '91'
+      - '115'
       Content-Type:
       - application/json; charset=utf-8
       ParameterSetName:
       - -g -n
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-loganalytics/0.5.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 yulocal msrest_azure/0.6.3
+        azure-mgmt-loganalytics/0.6.0 Azure-SDK-For-Python AZURECLI/2.7.0
       accept-language:
       - en-US
     method: PUT
@@ -242,26 +246,28 @@ interactions:
   response:
     body:
       string: "{\r\n  \"properties\": {\r\n    \"source\": \"Azure\",\r\n    \"customerId\":
-        \"bea273ee-b49e-4e3d-a012-5093204d0e6d\",\r\n    \"provisioningState\": \"Creating\",\r\n
-        \   \"sku\": {\r\n      \"name\": \"pergb2018\",\r\n      \"lastSkuUpdate\":
-        \"Mon, 27 Apr 2020 08:23:54 GMT\"\r\n    },\r\n    \"retentionInDays\": 30,\r\n
-        \   \"features\": {\r\n      \"legacy\": 0,\r\n      \"searchVersion\": 1,\r\n
-        \     \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n    },\r\n
-        \   \"workspaceCapping\": {\r\n      \"dailyQuotaGb\": -1.0,\r\n      \"quotaNextResetTime\":
-        \"Mon, 27 Apr 2020 10:00:00 GMT\",\r\n      \"dataIngestionStatus\": \"RespectQuota\"\r\n
-        \   },\r\n    \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n    \"publicNetworkAccessForQuery\":
-        \"Enabled\"\r\n  },\r\n  \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000003\",\r\n
+        \"d8068612-6de1-47f4-bfaf-9ad1bb4b27ee\",\r\n    \"provisioningState\": \"Creating\",\r\n
+        \   \"sku\": {\r\n      \"name\": \"pergb2018\",\r\n      \"maxCapacityReservationLevel\":
+        1000,\r\n      \"lastSkuUpdate\": \"Tue, 09 Jun 2020 07:09:37 GMT\"\r\n    },\r\n
+        \   \"retentionInDays\": 30,\r\n    \"features\": {\r\n      \"legacy\": 0,\r\n
+        \     \"searchVersion\": 1,\r\n      \"enableLogAccessUsingOnlyResourcePermissions\":
+        true\r\n    },\r\n    \"workspaceCapping\": {\r\n      \"dailyQuotaGb\": -1.0,\r\n
+        \     \"quotaNextResetTime\": \"Wed, 10 Jun 2020 06:00:00 GMT\",\r\n      \"dataIngestionStatus\":
+        \"RespectQuota\"\r\n    },\r\n    \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n
+        \   \"publicNetworkAccessForQuery\": \"Enabled\",\r\n    \"createdDate\":
+        \"Tue, 09 Jun 2020 07:09:37 GMT\",\r\n    \"modifiedDate\": \"Tue, 09 Jun
+        2020 07:09:37 GMT\"\r\n  },\r\n  \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000003\",\r\n
         \ \"name\": \"clitest000003\",\r\n  \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n
         \ \"location\": \"westus\"\r\n}"
     headers:
       cache-control:
       - no-cache
       content-length:
-      - '1026'
+      - '1177'
       content-type:
       - application/json
       date:
-      - Mon, 27 Apr 2020 08:23:55 GMT
+      - Tue, 09 Jun 2020 07:09:38 GMT
       pragma:
       - no-cache
       server:
@@ -272,7 +278,7 @@ interactions:
       x-content-type-options:
       - nosniff
       x-ms-ratelimit-remaining-subscription-writes:
-      - '1198'
+      - '1199'
       x-powered-by:
       - ASP.NET
       - ASP.NET
@@ -293,33 +299,35 @@ interactions:
       ParameterSetName:
       - -g -n
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-loganalytics/0.5.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 yulocal msrest_azure/0.6.3
+        azure-mgmt-loganalytics/0.6.0 Azure-SDK-For-Python AZURECLI/2.7.0
     method: GET
     uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/clitest000003?api-version=2020-03-01-preview
   response:
     body:
       string: "{\r\n  \"properties\": {\r\n    \"source\": \"Azure\",\r\n    \"customerId\":
-        \"bea273ee-b49e-4e3d-a012-5093204d0e6d\",\r\n    \"provisioningState\": \"Succeeded\",\r\n
-        \   \"sku\": {\r\n      \"name\": \"pergb2018\",\r\n      \"lastSkuUpdate\":
-        \"Mon, 27 Apr 2020 08:23:54 GMT\"\r\n    },\r\n    \"retentionInDays\": 30,\r\n
-        \   \"features\": {\r\n      \"legacy\": 0,\r\n      \"searchVersion\": 1,\r\n
-        \     \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n    },\r\n
-        \   \"workspaceCapping\": {\r\n      \"dailyQuotaGb\": -1.0,\r\n      \"quotaNextResetTime\":
-        \"Mon, 27 Apr 2020 10:00:00 GMT\",\r\n      \"dataIngestionStatus\": \"RespectQuota\"\r\n
-        \   },\r\n    \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n    \"publicNetworkAccessForQuery\":
-        \"Enabled\"\r\n  },\r\n  \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000003\",\r\n
+        \"d8068612-6de1-47f4-bfaf-9ad1bb4b27ee\",\r\n    \"provisioningState\": \"Succeeded\",\r\n
+        \   \"sku\": {\r\n      \"name\": \"pergb2018\",\r\n      \"maxCapacityReservationLevel\":
+        1000,\r\n      \"lastSkuUpdate\": \"Tue, 09 Jun 2020 07:09:37 GMT\"\r\n    },\r\n
+        \   \"retentionInDays\": 30,\r\n    \"features\": {\r\n      \"legacy\": 0,\r\n
+        \     \"searchVersion\": 1,\r\n      \"enableLogAccessUsingOnlyResourcePermissions\":
+        true\r\n    },\r\n    \"workspaceCapping\": {\r\n      \"dailyQuotaGb\": -1.0,\r\n
+        \     \"quotaNextResetTime\": \"Wed, 10 Jun 2020 06:00:00 GMT\",\r\n      \"dataIngestionStatus\":
+        \"RespectQuota\"\r\n    },\r\n    \"enableFailover\": false,\r\n    \"publicNetworkAccessForIngestion\":
+        \"Enabled\",\r\n    \"publicNetworkAccessForQuery\": \"Enabled\",\r\n    \"createdDate\":
+        \"Tue, 09 Jun 2020 07:09:37 GMT\",\r\n    \"modifiedDate\": \"Tue, 09 Jun
+        2020 07:09:38 GMT\"\r\n  },\r\n  \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000003\",\r\n
         \ \"name\": \"clitest000003\",\r\n  \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n
         \ \"location\": \"westus\"\r\n}"
     headers:
       cache-control:
       - no-cache
       content-length:
-      - '1027'
+      - '1208'
       content-type:
       - application/json
       date:
-      - Mon, 27 Apr 2020 08:24:28 GMT
+      - Tue, 09 Jun 2020 07:10:10 GMT
       pragma:
       - no-cache
       server:
@@ -341,8 +349,7 @@ interactions:
       message: OK
 - request:
     body: '{"location": "westus", "kind": "web", "properties": {"Application_Type":
-      "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "RetentionInDays":
-      90}}'
+      "web", "Flow_Type": "Bluefield", "Request_Source": "rest"}}'
     headers:
       Accept:
       - application/json
@@ -353,32 +360,32 @@ interactions:
       Connection:
       - keep-alive
       Content-Length:
-      - '155'
+      - '132'
       Content-Type:
       - application/json; charset=utf-8
       ParameterSetName:
       - --app --location --kind -g --application-type
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       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":"\"1800d0ff-0000-0700-0000-5ea696c50000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"aea67cde-e179-42d5-b51f-efe4548c63c4","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"697eb707-a56f-4ae1-948a-478e3159d171","ConnectionString":"InstrumentationKey=697eb707-a56f-4ae1-948a-478e3159d171","Name":"demoApp","CreationDate":"2020-04-27T08:24:37.8571823+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","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":"\"270025bd-0000-0700-0000-5edf35d80000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"a759d28c-6137-45a3-a459-5e1c32bd0976","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"e7c744c9-130f-4a80-957e-0961818a6ffd","ConnectionString":"InstrumentationKey=e7c744c9-130f-4a80-957e-0961818a6ffd","Name":"demoApp","CreationDate":"2020-06-09T07:10:16.604336+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:
-      - '957'
+      - '975'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Mon, 27 Apr 2020 08:24:40 GMT
+      - Tue, 09 Jun 2020 07:10:17 GMT
       expires:
       - '-1'
       pragma:
@@ -396,7 +403,7 @@ interactions:
       x-content-type-options:
       - nosniff
       x-ms-ratelimit-remaining-subscription-writes:
-      - '1198'
+      - '1199'
       x-powered-by:
       - ASP.NET
     status:
@@ -416,26 +423,26 @@ interactions:
       ParameterSetName:
       - --app --workspace -g
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       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=2020-02-02-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":"\"1800d0ff-0000-0700-0000-5ea696c50000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"aea67cde-e179-42d5-b51f-efe4548c63c4","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"697eb707-a56f-4ae1-948a-478e3159d171","Name":"demoApp","CreationDate":"2020-04-27T08:24:37.8571823+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","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":"\"270025bd-0000-0700-0000-5edf35d80000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"a759d28c-6137-45a3-a459-5e1c32bd0976","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"e7c744c9-130f-4a80-957e-0961818a6ffd","Name":"demoApp","CreationDate":"2020-06-09T07:10:16.604336+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:
-      - '880'
+      - '898'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Mon, 27 Apr 2020 08:24:43 GMT
+      - Tue, 09 Jun 2020 07:10:19 GMT
       expires:
       - '-1'
       pragma:
@@ -479,26 +486,26 @@ interactions:
       ParameterSetName:
       - --app --workspace -g
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       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=2020-02-02-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":"\"1800faff-0000-0700-0000-5ea696cf0000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"aea67cde-e179-42d5-b51f-efe4548c63c4","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"697eb707-a56f-4ae1-948a-478e3159d171","Name":"demoApp","CreationDate":"2020-04-27T08:24:37.8571823+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000002","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":"\"27002bbd-0000-0700-0000-5edf35e00000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"a759d28c-6137-45a3-a459-5e1c32bd0976","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"e7c744c9-130f-4a80-957e-0961818a6ffd","Name":"demoApp","CreationDate":"2020-06-09T07:10:16.604336+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000002","IngestionMode":"LogAnalytics","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
     headers:
       access-control-expose-headers:
       - Request-Context
       cache-control:
       - no-cache
       content-length:
-      - '1119'
+      - '1130'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Mon, 27 Apr 2020 08:24:49 GMT
+      - Tue, 09 Jun 2020 07:10:24 GMT
       expires:
       - '-1'
       pragma:
@@ -516,7 +523,7 @@ interactions:
       x-content-type-options:
       - nosniff
       x-ms-ratelimit-remaining-subscription-writes:
-      - '1197'
+      - '1199'
       x-powered-by:
       - ASP.NET
     status:
@@ -536,26 +543,26 @@ interactions:
       ParameterSetName:
       - --app --workspace -g
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       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=2020-02-02-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":"\"1800faff-0000-0700-0000-5ea696cf0000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"aea67cde-e179-42d5-b51f-efe4548c63c4","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"697eb707-a56f-4ae1-948a-478e3159d171","Name":"demoApp","CreationDate":"2020-04-27T08:24:37.8571823+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000002","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":"\"27002bbd-0000-0700-0000-5edf35e00000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"a759d28c-6137-45a3-a459-5e1c32bd0976","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"e7c744c9-130f-4a80-957e-0961818a6ffd","Name":"demoApp","CreationDate":"2020-06-09T07:10:16.604336+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000002","IngestionMode":"LogAnalytics","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
     headers:
       access-control-expose-headers:
       - Request-Context
       cache-control:
       - no-cache
       content-length:
-      - '1119'
+      - '1130'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Mon, 27 Apr 2020 08:24:51 GMT
+      - Tue, 09 Jun 2020 07:10:25 GMT
       expires:
       - '-1'
       pragma:
@@ -599,26 +606,26 @@ interactions:
       ParameterSetName:
       - --app --workspace -g
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       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=2020-02-02-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":"\"19002d00-0000-0700-0000-5ea696d60000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"aea67cde-e179-42d5-b51f-efe4548c63c4","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"697eb707-a56f-4ae1-948a-478e3159d171","Name":"demoApp","CreationDate":"2020-04-27T08:24:37.8571823+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000003","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":"\"27002dbd-0000-0700-0000-5edf35e40000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"a759d28c-6137-45a3-a459-5e1c32bd0976","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"e7c744c9-130f-4a80-957e-0961818a6ffd","Name":"demoApp","CreationDate":"2020-06-09T07:10:16.604336+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000003","IngestionMode":"LogAnalytics","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
     headers:
       access-control-expose-headers:
       - Request-Context
       cache-control:
       - no-cache
       content-length:
-      - '1119'
+      - '1130'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Mon, 27 Apr 2020 08:24:56 GMT
+      - Tue, 09 Jun 2020 07:10:28 GMT
       expires:
       - '-1'
       pragma:
@@ -656,26 +663,26 @@ interactions:
       ParameterSetName:
       - --app --workspace --kind -g
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       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=2020-02-02-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":"\"19002d00-0000-0700-0000-5ea696d60000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"aea67cde-e179-42d5-b51f-efe4548c63c4","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"697eb707-a56f-4ae1-948a-478e3159d171","Name":"demoApp","CreationDate":"2020-04-27T08:24:37.8571823+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000003","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":"\"27002dbd-0000-0700-0000-5edf35e40000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"a759d28c-6137-45a3-a459-5e1c32bd0976","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"e7c744c9-130f-4a80-957e-0961818a6ffd","Name":"demoApp","CreationDate":"2020-06-09T07:10:16.604336+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000003","IngestionMode":"LogAnalytics","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
     headers:
       access-control-expose-headers:
       - Request-Context
       cache-control:
       - no-cache
       content-length:
-      - '1119'
+      - '1130'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Mon, 27 Apr 2020 08:24:59 GMT
+      - Tue, 09 Jun 2020 07:10:29 GMT
       expires:
       - '-1'
       pragma:
@@ -719,26 +726,26 @@ interactions:
       ParameterSetName:
       - --app --workspace --kind -g
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       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=2020-02-02-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":"\"19007500-0000-0700-0000-5ea696ea0000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"aea67cde-e179-42d5-b51f-efe4548c63c4","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"697eb707-a56f-4ae1-948a-478e3159d171","Name":"demoApp","CreationDate":"2020-04-27T08:24:37.8571823+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000002","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":"\"270035bd-0000-0700-0000-5edf35e90000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"a759d28c-6137-45a3-a459-5e1c32bd0976","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"e7c744c9-130f-4a80-957e-0961818a6ffd","Name":"demoApp","CreationDate":"2020-06-09T07:10:16.604336+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000002","IngestionMode":"LogAnalytics","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
     headers:
       access-control-expose-headers:
       - Request-Context
       cache-control:
       - no-cache
       content-length:
-      - '1119'
+      - '1130'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Mon, 27 Apr 2020 08:25:19 GMT
+      - Tue, 09 Jun 2020 07:10:37 GMT
       expires:
       - '-1'
       pragma:
@@ -756,7 +763,7 @@ interactions:
       x-content-type-options:
       - nosniff
       x-ms-ratelimit-remaining-subscription-writes:
-      - '1198'
+      - '1199'
       x-powered-by:
       - ASP.NET
     status:
@@ -782,26 +789,26 @@ interactions:
       ParameterSetName:
       - --app --workspace --location --kind -g --application-type
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       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=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":"\"19000801-0000-0700-0000-5ea6970b0000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"6d710c63-8820-4729-b78c-8344fd5adce2","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"869dc5d3-0c6e-42ee-b873-fbd1ad8c31fd","Name":"testApp","CreationDate":"2020-04-27T08:25:47.5261462+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000003","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":"\"27004fbd-0000-0700-0000-5edf36090000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"3690cbb7-3421-4d91-8dbf-cab15dd77627","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"4b54409a-741f-4e84-8d9c-8754f2b8ed9f","Name":"testApp","CreationDate":"2020-06-09T07:11:04.5847907+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000003","IngestionMode":"LogAnalytics","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
     headers:
       access-control-expose-headers:
       - Request-Context
       cache-control:
       - no-cache
       content-length:
-      - '1079'
+      - '1131'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Mon, 27 Apr 2020 08:25:49 GMT
+      - Tue, 09 Jun 2020 07:11:28 GMT
       expires:
       - '-1'
       pragma:
@@ -839,26 +846,26 @@ interactions:
       ParameterSetName:
       - --app --kind -g
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       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=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":"\"19000801-0000-0700-0000-5ea6970b0000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"6d710c63-8820-4729-b78c-8344fd5adce2","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"869dc5d3-0c6e-42ee-b873-fbd1ad8c31fd","ConnectionString":"InstrumentationKey=869dc5d3-0c6e-42ee-b873-fbd1ad8c31fd","Name":"testApp","CreationDate":"2020-04-27T08:25:47.5261462+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000003","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":"\"27004fbd-0000-0700-0000-5edf36090000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"3690cbb7-3421-4d91-8dbf-cab15dd77627","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"4b54409a-741f-4e84-8d9c-8754f2b8ed9f","ConnectionString":"InstrumentationKey=4b54409a-741f-4e84-8d9c-8754f2b8ed9f","Name":"testApp","CreationDate":"2020-06-09T07:11:04.5847907+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000003","IngestionMode":"LogAnalytics","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
     headers:
       access-control-expose-headers:
       - Request-Context
       cache-control:
       - no-cache
       content-length:
-      - '1156'
+      - '1208'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Mon, 27 Apr 2020 08:25:52 GMT
+      - Tue, 09 Jun 2020 07:11:30 GMT
       expires:
       - '-1'
       pragma:
@@ -882,8 +889,9 @@ interactions:
       message: OK
 - request:
     body: '{"location": "westus", "tags": {}, "kind": "ios", "properties": {"Application_Type":
-      "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "publicNetworkAccessForIngestion":
-      "Enabled", "publicNetworkAccessForQuery": "Enabled"}}'
+      "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "RetentionInDays":
+      90, "publicNetworkAccessForIngestion": "Enabled", "publicNetworkAccessForQuery":
+      "Enabled"}}'
     headers:
       Accept:
       - application/json
@@ -894,32 +902,32 @@ interactions:
       Connection:
       - keep-alive
       Content-Length:
-      - '232'
+      - '255'
       Content-Type:
       - application/json; charset=utf-8
       ParameterSetName:
       - --app --kind -g
       User-Agent:
-      - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
-        azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+      - 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
       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":"\"19003b01-0000-0700-0000-5ea697120000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"6d710c63-8820-4729-b78c-8344fd5adce2","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"869dc5d3-0c6e-42ee-b873-fbd1ad8c31fd","ConnectionString":"InstrumentationKey=869dc5d3-0c6e-42ee-b873-fbd1ad8c31fd","Name":"testApp","CreationDate":"2020-04-27T08:25:47.5261462+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"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":"\"27007cbd-0000-0700-0000-5edf36230000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"3690cbb7-3421-4d91-8dbf-cab15dd77627","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"4b54409a-741f-4e84-8d9c-8754f2b8ed9f","ConnectionString":"InstrumentationKey=4b54409a-741f-4e84-8d9c-8754f2b8ed9f","Name":"testApp","CreationDate":"2020-06-09T07:11:04.5847907+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","IngestionMode":"ApplicationInsights","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
     headers:
       access-control-expose-headers:
       - Request-Context
       cache-control:
       - no-cache
       content-length:
-      - '917'
+      - '995'
       content-type:
       - application/json; charset=utf-8
       date:
-      - Mon, 27 Apr 2020 08:25:55 GMT
+      - Tue, 09 Jun 2020 07:11:32 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
@@ -17,16 +17,18 @@ def test_component(self, resource_group, location):
             'name_a': 'demoApp',
             'name_b': 'testApp',
             'kind': 'web',
-            'application_type': 'web'
+            'application_type': 'web',
+            'retention_time': 120
         })
 
-        self.cmd('az monitor app-insights component create --app {name_a} --location {loc} --kind {kind} -g {resource_group} --application-type {application_type}', checks=[
+        self.cmd('az monitor app-insights component create --app {name_a} --location {loc} --kind {kind} -g {resource_group} --application-type {application_type} --retention-time {retention_time}', checks=[
             self.check('name', '{name_a}'),
             self.check('location', '{loc}'),
             self.check('kind', '{kind}'),
             self.check('applicationType', '{application_type}'),
             self.check('applicationId', '{name_a}'),
             self.check('provisioningState', 'Succeeded'),
+            self.check('retentionInDays', self.kwargs['retention_time'])
         ])
 
         self.cmd('monitor app-insights component billing show --app {name_a} -g {resource_group}', checks=[
@@ -39,11 +41,13 @@ def test_component(self, resource_group, location):
         ])
 
         self.kwargs.update({
-            'kind': 'ios'
+            'kind': 'ios',
+            'retention_time': 180
         })
 
-        self.cmd('az monitor app-insights component update --app {name_a} --kind {kind} -g {resource_group}', checks=[
-            self.check('kind', '{kind}')
+        self.cmd('az monitor app-insights component update --app {name_a} --kind {kind} -g {resource_group} --retention-time {retention_time}', checks=[
+            self.check('kind', '{kind}'),
+            self.check('retentionInDays', self.kwargs['retention_time'])
         ])
 
         self.cmd('az monitor app-insights component create --app {name_b} --location {loc} --kind {kind} -g {resource_group} --application-type {application_type}', checks=[