Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Application Insights] az monitor app-insights events show: Add enum values for --type #3700

Merged
merged 3 commits into from
Jul 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/application-insights/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
.. :changelog:

Release History
===============
0.1.14
++++++++++++++++++

* `az monitor app-insights events show`: Add enum values for `--type`.

0.1.13
++++++++++++++++++

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def load_arguments(self, _):
c.argument('offset', help='Filter results based on UTC hour offset.', type=get_period_type(as_timedelta=True))

with self.argument_context('monitor app-insights events show') as c:
c.argument('event_type', options_list=['--type'], help='The type of events to retrieve.')
from .vendored_sdks.applicationinsights.models import EventType
c.argument('event_type', options_list=['--type'], arg_type=get_enum_type(EventType), help='The type of events to retrieve.')
c.argument('event', options_list=['--event'], help='GUID of the event to retrieve. This could be obtained by first listing and filtering events, then selecting an event of interest.')
c.argument('start_time', arg_type=get_datetime_type(help='Start-time of time range for which to retrieve data.'))
c.argument('end_time', arg_type=get_datetime_type(help='End of time range for current operation. Defaults to the current time.'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ interactions:
ParameterSetName:
- -g -n
User-Agent:
- AZURECLI/2.23.0 azsdk-python-azure-mgmt-resource/16.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0)
- AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2020-10-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2021-04-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":"2021-05-14T08:53:46Z"},"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":"2021-07-28T03:41:46Z"},"properties":{"provisioningState":"Succeeded"}}'
headers:
cache-control:
- no-cache
Expand All @@ -27,7 +27,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Fri, 14 May 2021 08:54:43 GMT
- Wed, 28 Jul 2021 03:42:43 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -60,22 +60,22 @@ interactions:
ParameterSetName:
- -g -n
User-Agent:
- AZURECLI/2.23.0 azsdk-python-mgmt-loganalytics/8.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0)
- AZURECLI/2.26.1 azsdk-python-mgmt-loganalytics/11.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/clitest000004?api-version=2020-08-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/clitest000004?api-version=2020-10-01
response:
body:
string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\":
\"110cf46b-4724-4f39-9bb8-c51383062935\",\r\n \"provisioningState\": \"Creating\",\r\n
\"727055c9-a320-423b-a7f6-54f833f05d8e\",\r\n \"provisioningState\": \"Creating\",\r\n
\ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\":
\"Fri, 14 May 2021 08:54:50 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n
\"Wed, 28 Jul 2021 03:42:50 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\":
\"Fri, 14 May 2021 20:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n
\"Wed, 28 Jul 2021 16:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n
\ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\":
\"Enabled\",\r\n \"createdDate\": \"Fri, 14 May 2021 08:54:50 GMT\",\r\n
\ \"modifiedDate\": \"Fri, 14 May 2021 08:54:50 GMT\"\r\n },\r\n \"id\":
\"Enabled\",\r\n \"createdDate\": \"Wed, 28 Jul 2021 03:42:50 GMT\",\r\n
\ \"modifiedDate\": \"Wed, 28 Jul 2021 03:42:50 GMT\"\r\n },\r\n \"id\":
\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000004\",\r\n
\ \"name\": \"clitest000004\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n
\ \"location\": \"westus\"\r\n}"
Expand All @@ -87,7 +87,7 @@ interactions:
content-type:
- application/json
date:
- Fri, 14 May 2021 08:54:51 GMT
- Wed, 28 Jul 2021 03:42:51 GMT
pragma:
- no-cache
server:
Expand All @@ -98,7 +98,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1197'
- '1199'
x-powered-by:
- ASP.NET
- ASP.NET
Expand All @@ -119,22 +119,22 @@ interactions:
ParameterSetName:
- -g -n
User-Agent:
- AZURECLI/2.23.0 azsdk-python-mgmt-loganalytics/8.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0)
- AZURECLI/2.26.1 azsdk-python-mgmt-loganalytics/11.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/clitest000004?api-version=2020-08-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/clitest000004?api-version=2020-10-01
response:
body:
string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\":
\"110cf46b-4724-4f39-9bb8-c51383062935\",\r\n \"provisioningState\": \"Succeeded\",\r\n
\"727055c9-a320-423b-a7f6-54f833f05d8e\",\r\n \"provisioningState\": \"Succeeded\",\r\n
\ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\":
\"Fri, 14 May 2021 08:54:50 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n
\"Wed, 28 Jul 2021 03:42:50 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\":
\"Fri, 14 May 2021 20:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n
\"Wed, 28 Jul 2021 16:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n
\ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\":
\"Enabled\",\r\n \"createdDate\": \"Fri, 14 May 2021 08:54:50 GMT\",\r\n
\ \"modifiedDate\": \"Fri, 14 May 2021 08:54:51 GMT\"\r\n },\r\n \"id\":
\"Enabled\",\r\n \"createdDate\": \"Wed, 28 Jul 2021 03:42:50 GMT\",\r\n
\ \"modifiedDate\": \"Wed, 28 Jul 2021 03:42:50 GMT\"\r\n },\r\n \"id\":
\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000004\",\r\n
\ \"name\": \"clitest000004\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n
\ \"location\": \"westus\"\r\n}"
Expand All @@ -146,7 +146,7 @@ interactions:
content-type:
- application/json
date:
- Fri, 14 May 2021 08:55:21 GMT
- Wed, 28 Jul 2021 03:43:21 GMT
pragma:
- no-cache
server:
Expand Down Expand Up @@ -187,24 +187,24 @@ interactions:
ParameterSetName:
- --app --location --kind -g --workspace --application-type
User-Agent:
- AZURECLI/2.23.0 azsdk-python-azure-mgmt-applicationinsights/1.0.0 Python/3.8.10
- AZURECLI/2.26.1 azsdk-python-azure-mgmt-applicationinsights/1.0.0 Python/3.8.10
(Windows-10-10.0.19043-SP0)
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":"\"730035d5-0000-0200-0000-609e3afe0000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"3feee0f2-e21b-4573-917e-5bde02a10156","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"221ae725-4653-43a3-a2ab-b36f7d755a60","ConnectionString":"InstrumentationKey=221ae725-4653-43a3-a2ab-b36f7d755a60;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/","Name":"demoApp","CreationDate":"2021-05-14T08:55:26.2516354+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/clitest000004","IngestionMode":"LogAnalytics","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":"\"0200ea46-0000-0200-0000-6100d2600000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"def714b9-3e3a-412c-8384-0fb2cab3776f","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"c241aee9-27a7-4f52-b073-83f873c73d3f","ConnectionString":"InstrumentationKey=c241aee9-27a7-4f52-b073-83f873c73d3f","Name":"demoApp","CreationDate":"2021-07-28T03:43:26.9622973+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/clitest000004","IngestionMode":"LogAnalytics","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
headers:
access-control-expose-headers:
- Request-Context
cache-control:
- no-cache
content-length:
- '1277'
- '1208'
content-type:
- application/json; charset=utf-8
date:
- Fri, 14 May 2021 08:55:28 GMT
- Wed, 28 Jul 2021 03:43:30 GMT
expires:
- '-1'
pragma:
Expand All @@ -222,7 +222,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1196'
- '1198'
x-powered-by:
- ASP.NET
status:
Expand All @@ -246,7 +246,7 @@ interactions:
ParameterSetName:
- --app -g -s
User-Agent:
- AZURECLI/2.23.0 azsdk-python-azure-mgmt-applicationinsights/1.0.0 Python/3.8.10
- AZURECLI/2.26.1 azsdk-python-azure-mgmt-applicationinsights/1.0.0 Python/3.8.10
(Windows-10-10.0.19043-SP0)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/linkedStorageAccounts/ServiceProfiler?api-version=2020-03-01-preview
Expand All @@ -266,7 +266,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Fri, 14 May 2021 08:55:33 GMT
- Wed, 28 Jul 2021 03:43:43 GMT
expires:
- '-1'
pragma:
Expand All @@ -284,7 +284,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1197'
- '1198'
x-powered-by:
- ASP.NET
status:
Expand All @@ -304,7 +304,7 @@ interactions:
ParameterSetName:
- --app -g
User-Agent:
- AZURECLI/2.23.0 azsdk-python-azure-mgmt-applicationinsights/1.0.0 Python/3.8.10
- AZURECLI/2.26.1 azsdk-python-azure-mgmt-applicationinsights/1.0.0 Python/3.8.10
(Windows-10-10.0.19043-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/linkedStorageAccounts/ServiceProfiler?api-version=2020-03-01-preview
Expand All @@ -324,7 +324,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Fri, 14 May 2021 08:55:34 GMT
- Wed, 28 Jul 2021 03:43:45 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -364,7 +364,7 @@ interactions:
ParameterSetName:
- --app -g -s
User-Agent:
- AZURECLI/2.23.0 azsdk-python-azure-mgmt-applicationinsights/1.0.0 Python/3.8.10
- AZURECLI/2.26.1 azsdk-python-azure-mgmt-applicationinsights/1.0.0 Python/3.8.10
(Windows-10-10.0.19043-SP0)
method: PATCH
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/linkedStorageAccounts/ServiceProfiler?api-version=2020-03-01-preview
Expand All @@ -384,7 +384,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Fri, 14 May 2021 08:55:39 GMT
- Wed, 28 Jul 2021 03:43:55 GMT
expires:
- '-1'
pragma:
Expand All @@ -402,7 +402,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1199'
- '1198'
x-powered-by:
- ASP.NET
status:
Expand All @@ -424,7 +424,7 @@ interactions:
ParameterSetName:
- --app -g
User-Agent:
- AZURECLI/2.23.0 azsdk-python-azure-mgmt-applicationinsights/1.0.0 Python/3.8.10
- AZURECLI/2.26.1 azsdk-python-azure-mgmt-applicationinsights/1.0.0 Python/3.8.10
(Windows-10-10.0.19043-SP0)
method: DELETE
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/linkedStorageAccounts/ServiceProfiler?api-version=2020-03-01-preview
Expand All @@ -439,7 +439,7 @@ interactions:
content-length:
- '0'
date:
- Fri, 14 May 2021 08:55:43 GMT
- Wed, 28 Jul 2021 03:44:01 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -473,7 +473,7 @@ interactions:
ParameterSetName:
- --app -g
User-Agent:
- AZURECLI/2.23.0 azsdk-python-azure-mgmt-applicationinsights/1.0.0 Python/3.8.10
- AZURECLI/2.26.1 azsdk-python-azure-mgmt-applicationinsights/1.0.0 Python/3.8.10
(Windows-10-10.0.19043-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/linkedStorageAccounts/ServiceProfiler?api-version=2020-03-01-preview
Expand All @@ -490,7 +490,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Fri, 14 May 2021 08:55:45 GMT
- Wed, 28 Jul 2021 03:44:02 GMT
expires:
- '-1'
pragma:
Expand Down
Loading