Skip to content

Commit f6c0c62

Browse files
author
SDKAuto
committed
CodeGen from PR 15540 in Azure/azure-rest-api-specs
Merge 3c943fe10854a1fe6f67a91b7f51913274b05893 into 57e30b5
1 parent 927c622 commit f6c0c62

File tree

76 files changed

+20897
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+20897
-0
lines changed

src/loganalytics/HISTORY.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. :changelog:
2+
3+
Release History
4+
===============
5+
6+
0.1.0
7+
++++++
8+
* Initial release.

src/loganalytics/README.md

Lines changed: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
# Azure CLI loganalytics Extension #
2+
This is the extension for loganalytics
3+
4+
### How to use ###
5+
Install this extension using the below CLI command
6+
```
7+
az extension add --name loganalytics
8+
```
9+
10+
### Included Features ###
11+
#### loganalytics data-export ####
12+
##### Create #####
13+
```
14+
az loganalytics data-export create --name "export1" \
15+
--resource-id "/subscriptions/192b9f85-a39a-4276-b96d-d5cd351703f9/resourceGroups/OIAutoRest1234/providers/Microsoft.EventHub/namespaces/test" \
16+
--table-names "Heartbeat" --resource-group "RgTest1" --workspace-name "DeWnTest1234"
17+
```
18+
##### Show #####
19+
```
20+
az loganalytics data-export show --name "export1" --resource-group "RgTest1" --workspace-name "DeWnTest1234"
21+
```
22+
##### List #####
23+
```
24+
az loganalytics data-export list --resource-group "RgTest1" --workspace-name "DeWnTest1234"
25+
```
26+
##### Delete #####
27+
```
28+
az loganalytics data-export delete --name "export1" --resource-group "RgTest1" --workspace-name "DeWnTest1234"
29+
```
30+
#### loganalytics data-source ####
31+
##### Create #####
32+
```
33+
az loganalytics data-source create --name "AzTestDS774" --kind "AzureActivityLog" \
34+
--properties "{\\"LinkedResourceId\\":\\"/subscriptions/00000000-0000-0000-0000-00000000000/providers/microsoft.insights/eventtypes/management\\"}" \
35+
--resource-group "OIAutoRest5123" --workspace-name "AzTest9724"
36+
```
37+
##### Show #####
38+
```
39+
az loganalytics data-source show --name "AzTestDS774" --resource-group "OIAutoRest5123" --workspace-name "AzTest9724"
40+
```
41+
##### List #####
42+
```
43+
az loganalytics data-source list --filter "kind=\'WindowsEvent\'" --resource-group "OIAutoRest5123" \
44+
--workspace-name "AzTest9724"
45+
```
46+
##### Delete #####
47+
```
48+
az loganalytics data-source delete --name "AzTestDS774" --resource-group "OIAutoRest5123" --workspace-name "AzTest9724"
49+
```
50+
#### loganalytics intelligence-pack ####
51+
##### List #####
52+
```
53+
az loganalytics intelligence-pack list --resource-group "rg1" --workspace-name "TestLinkWS"
54+
```
55+
##### Disable #####
56+
```
57+
az loganalytics intelligence-pack disable --name "ChangeTracking" --resource-group "rg1" --workspace-name "TestLinkWS"
58+
```
59+
##### Enable #####
60+
```
61+
az loganalytics intelligence-pack enable --name "ChangeTracking" --resource-group "rg1" --workspace-name "TestLinkWS"
62+
```
63+
#### loganalytics linked-service ####
64+
##### Create #####
65+
```
66+
az loganalytics linked-service create --name "Cluster" \
67+
--write-access-resource-id "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/clusters/testcluster" \
68+
--resource-group "mms-eus" --workspace-name "TestLinkWS"
69+
70+
az loganalytics linked-service wait --created --name "{myLinkedService}" --resource-group "{rg_5}"
71+
```
72+
##### Show #####
73+
```
74+
az loganalytics linked-service show --name "Cluster" --resource-group "mms-eus" --workspace-name "TestLinkWS"
75+
```
76+
##### List #####
77+
```
78+
az loganalytics linked-service list --resource-group "mms-eus" --workspace-name "TestLinkWS"
79+
```
80+
##### Delete #####
81+
```
82+
az loganalytics linked-service delete --name "Cluster" --resource-group "rg1" --workspace-name "TestLinkWS"
83+
```
84+
#### loganalytics linked-storage-account ####
85+
##### Create #####
86+
```
87+
az loganalytics linked-storage-account create --data-source-type "CustomLogs" \
88+
--storage-account-ids "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageA" "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageB" \
89+
--resource-group "mms-eus" --workspace-name "testLinkStorageAccountsWS"
90+
```
91+
##### Show #####
92+
```
93+
az loganalytics linked-storage-account show --data-source-type "CustomLogs" --resource-group "mms-eus" \
94+
--workspace-name "testLinkStorageAccountsWS"
95+
```
96+
##### List #####
97+
```
98+
az loganalytics linked-storage-account list --resource-group "mms-eus" --workspace-name "testLinkStorageAccountsWS"
99+
```
100+
##### Delete #####
101+
```
102+
az loganalytics linked-storage-account delete --data-source-type "CustomLogs" --resource-group "mms-eus" \
103+
--workspace-name "testLinkStorageAccountsWS"
104+
```
105+
#### loganalytics management-group ####
106+
##### List #####
107+
```
108+
az loganalytics management-group list --resource-group "rg1" --workspace-name "TestLinkWS"
109+
```
110+
#### loganalytics operation-statuses ####
111+
##### Show #####
112+
```
113+
az loganalytics operation-statuses show --async-operation-id "713192d7-503f-477a-9cfe-4efc3ee2bd11" \
114+
--location "West US"
115+
```
116+
#### loganalytics shared-key ####
117+
##### Get-shared-key #####
118+
```
119+
az loganalytics shared-key get-shared-key --resource-group "rg1" --workspace-name "TestLinkWS"
120+
```
121+
##### Regenerate #####
122+
```
123+
az loganalytics shared-key regenerate --resource-group "rg1" --workspace-name "workspace1"
124+
```
125+
#### loganalytics usage ####
126+
##### List #####
127+
```
128+
az loganalytics usage list --resource-group "rg1" --workspace-name "TestLinkWS"
129+
```
130+
#### loganalytics storage-insight-config ####
131+
##### Create #####
132+
```
133+
az loganalytics storage-insight-config create --containers "wad-iis-logfiles" \
134+
--storage-account id="/subscriptions/00000000-0000-0000-0000-000000000005/resourcegroups/OIAutoRest6987/providers/microsoft.storage/storageaccounts/AzTestFakeSA9945" key="1234" \
135+
--tables "WADWindowsEventLogsTable" "LinuxSyslogVer2v0" --resource-group "OIAutoRest5123" \
136+
--storage-insight-name "AzTestSI1110" --workspace-name "aztest5048"
137+
```
138+
##### Show #####
139+
```
140+
az loganalytics storage-insight-config show --resource-group "OIAutoRest5123" --storage-insight-name "AzTestSI1110" \
141+
--workspace-name "aztest5048"
142+
```
143+
##### List #####
144+
```
145+
az loganalytics storage-insight-config list --resource-group "OIAutoRest5123" --workspace-name "aztest5048"
146+
```
147+
##### Delete #####
148+
```
149+
az loganalytics storage-insight-config delete --resource-group "OIAutoRest5123" --storage-insight-name "AzTestSI1110" \
150+
--workspace-name "aztest5048"
151+
```
152+
#### loganalytics saved-search ####
153+
##### Create #####
154+
```
155+
az loganalytics saved-search create --category "Saved Search Test Category" \
156+
--display-name "Create or Update Saved Search Test" --function-alias "heartbeat_func" \
157+
--function-parameters "a:int=1" --query "Heartbeat | summarize Count() by Computer | take a" \
158+
--tags name="Group" value="Computer" --version 2 --resource-group "TestRG" \
159+
--saved-search-id "00000000-0000-0000-0000-00000000000" --workspace-name "TestWS"
160+
```
161+
##### Show #####
162+
```
163+
az loganalytics saved-search show --resource-group "TestRG" --saved-search-id "00000000-0000-0000-0000-00000000000" \
164+
--workspace-name "TestWS"
165+
```
166+
##### List #####
167+
```
168+
az loganalytics saved-search list --resource-group "TestRG" --workspace-name "TestWS"
169+
```
170+
##### Delete #####
171+
```
172+
az loganalytics saved-search delete --resource-group "TestRG" --saved-search-id "00000000-0000-0000-0000-00000000000" \
173+
--workspace-name "TestWS"
174+
```
175+
#### loganalytics available-service-tier ####
176+
##### List #####
177+
```
178+
az loganalytics available-service-tier list --resource-group "rg1" --workspace-name "workspace1"
179+
```
180+
#### loganalytics gateway ####
181+
##### Delete #####
182+
```
183+
az loganalytics gateway delete --gateway-id "00000000-0000-0000-0000-00000000000" --resource-group "OIAutoRest5123" \
184+
--workspace-name "aztest5048"
185+
```
186+
#### loganalytics schema ####
187+
##### Get #####
188+
```
189+
az loganalytics schema get --resource-group "mms-eus" --workspace-name "atlantisdemo"
190+
```
191+
#### loganalytics workspace-purge ####
192+
##### Purge #####
193+
```
194+
az loganalytics workspace-purge purge \
195+
--filters "[{\\"column\\":\\"TimeGenerated\\",\\"operator\\":\\">\\",\\"value\\":\\"2017-09-01T00:00:00\\"}]" \
196+
--table "Heartbeat" --resource-group "OIAutoRest5123" --workspace-name "aztest5048"
197+
```
198+
##### Show-purge-status #####
199+
```
200+
az loganalytics workspace-purge show-purge-status --purge-id "purge-970318e7-b859-4edb-8903-83b1b54d0b74" \
201+
--resource-group "OIAutoRest5123" --workspace-name "aztest5048"
202+
```
203+
#### loganalytics table ####
204+
##### List #####
205+
```
206+
az loganalytics table list --resource-group "oiautorest6685" --workspace-name "oiautorest6685"
207+
```
208+
##### Show #####
209+
```
210+
az loganalytics table show --resource-group "oiautorest6685" --name "table1" --workspace-name "oiautorest6685"
211+
```
212+
##### Update #####
213+
```
214+
az loganalytics table update --retention-in-days 30 --resource-group "oiautorest6685" --name "table1" \
215+
--workspace-name "oiautorest6685"
216+
```
217+
#### loganalytics cluster ####
218+
##### Create #####
219+
```
220+
az loganalytics cluster create --name "oiautorest6685" --location "australiasoutheast" \
221+
--sku name="CapacityReservation" capacity=1000 --tags tag1="val1" --resource-group "oiautorest6685"
222+
223+
az loganalytics cluster wait --created --name "{rg_8}" --resource-group "{rg_8}"
224+
```
225+
##### Show #####
226+
```
227+
az loganalytics cluster show --name "oiautorest6685" --resource-group "oiautorest6685"
228+
```
229+
##### List #####
230+
```
231+
az loganalytics cluster list --resource-group "oiautorest6685"
232+
```
233+
##### Update #####
234+
```
235+
az loganalytics cluster update --name "oiautorest6685" --type "UserAssigned" \
236+
--user-assigned-identities "{\\"/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/oiautorest6685/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity\\":{}}" \
237+
--key-vault-properties key-name="aztest2170cert" key-rsa-size=1024 key-vault-uri="https://aztest2170.vault.azure.net" key-version="654ft6c4e63845cbb50fd6fg51540429" \
238+
--sku name="CapacityReservation" capacity=1000 --tags tag1="val1" --resource-group "oiautorest6685"
239+
```
240+
##### Delete #####
241+
```
242+
az loganalytics cluster delete --name "oiautorest6685" --resource-group "oiautorest6685"
243+
```
244+
#### loganalytics workspace ####
245+
##### Create #####
246+
```
247+
az loganalytics workspace create --location "australiasoutheast" --retention-in-days 30 --sku name="PerGB2018" \
248+
--tags tag1="val1" --resource-group "oiautorest6685" --name "oiautorest6685"
249+
250+
az loganalytics workspace wait --created --resource-group "{rg_8}" --name "{rg_8}"
251+
```
252+
##### Show #####
253+
```
254+
az loganalytics workspace show --resource-group "oiautorest6685" --name "oiautorest6685"
255+
```
256+
##### List #####
257+
```
258+
az loganalytics workspace list --resource-group "oiautorest6685"
259+
```
260+
##### Update #####
261+
```
262+
az loganalytics workspace update --retention-in-days 30 --sku name="PerGB2018" --daily-quota-gb -1 \
263+
--resource-group "oiautorest6685" --name "oiautorest6685"
264+
```
265+
##### Delete #####
266+
```
267+
az loganalytics workspace delete --resource-group "oiautorest6685" --name "oiautorest6685"
268+
```
269+
#### loganalytics deleted-workspace ####
270+
##### List #####
271+
```
272+
az loganalytics deleted-workspace list --resource-group "oiautorest6685"
273+
```
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
11+
from azure.cli.core import AzCommandsLoader
12+
from azext_loganalytics.generated._help import helps # pylint: disable=unused-import
13+
try:
14+
from azext_loganalytics.manual._help import helps # pylint: disable=reimported
15+
except ImportError:
16+
pass
17+
18+
19+
class OperationalInsightsManagementClientCommandsLoader(AzCommandsLoader):
20+
21+
def __init__(self, cli_ctx=None):
22+
from azure.cli.core.commands import CliCommandType
23+
from azext_loganalytics.generated._client_factory import cf_loganalytics_cl
24+
loganalytics_custom = CliCommandType(
25+
operations_tmpl='azext_loganalytics.custom#{}',
26+
client_factory=cf_loganalytics_cl)
27+
parent = super(OperationalInsightsManagementClientCommandsLoader, self)
28+
parent.__init__(cli_ctx=cli_ctx, custom_command_type=loganalytics_custom)
29+
30+
def load_command_table(self, args):
31+
from azext_loganalytics.generated.commands import load_command_table
32+
load_command_table(self, args)
33+
try:
34+
from azext_loganalytics.manual.commands import load_command_table as load_command_table_manual
35+
load_command_table_manual(self, args)
36+
except ImportError:
37+
pass
38+
return self.command_table
39+
40+
def load_arguments(self, command):
41+
from azext_loganalytics.generated._params import load_arguments
42+
load_arguments(self, command)
43+
try:
44+
from azext_loganalytics.manual._params import load_arguments as load_arguments_manual
45+
load_arguments_manual(self, command)
46+
except ImportError:
47+
pass
48+
49+
50+
COMMAND_LOADER_CLS = OperationalInsightsManagementClientCommandsLoader
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=wildcard-import
11+
# pylint: disable=unused-wildcard-import
12+
13+
from .generated.action import * # noqa: F403
14+
try:
15+
from .manual.action import * # noqa: F403
16+
except ImportError:
17+
pass
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"azext.isExperimental": true,
3+
"azext.minCliCoreVersion": "2.15.0"
4+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=wildcard-import
11+
# pylint: disable=unused-wildcard-import
12+
13+
from .generated.custom import * # noqa: F403
14+
try:
15+
from .manual.custom import * # noqa: F403
16+
except ImportError:
17+
pass
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)

0 commit comments

Comments
 (0)