-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen from PR 15573 in Azure/azure-rest-api-specs
resolving correctness error in preview (#15573) * resolving correctness error in preview * adding max time for long running operations Co-authored-by: Gaurav Bang <gauravbang@microsoft.com>
- Loading branch information
SDKAuto
and
Gaurav Bang
committed
Aug 10, 2021
1 parent
f2ad727
commit da382c3
Showing
50 changed files
with
12,134 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.. :changelog: | ||
Release History | ||
=============== | ||
|
||
0.1.0 | ||
++++++ | ||
* Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
# Azure CLI logz Extension # | ||
This is the extension for logz | ||
|
||
### How to use ### | ||
Install this extension using the below CLI command | ||
``` | ||
az extension add --name logz | ||
``` | ||
|
||
### Included Features ### | ||
#### logz monitor #### | ||
##### Create ##### | ||
``` | ||
az logz monitor create --name "myMonitor" --location "West US" \ | ||
--plan-data billing-cycle="Monthly" effective-date="2019-08-30T15:14:33+02:00" plan-details="logzapitestplan" usage-type="Committed" \ | ||
--user-info email-address="alice@microsoft.com" first-name="Alice" last-name="Bob" phone-number="123456" \ | ||
--tags Environment="Dev" --resource-group "myResourceGroup" | ||
az logz monitor wait --created --name "{myMonitor}" --resource-group "{rg}" | ||
``` | ||
##### Show ##### | ||
``` | ||
az logz monitor show --name "myMonitor" --resource-group "myResourceGroup" | ||
``` | ||
##### List ##### | ||
``` | ||
az logz monitor list --resource-group "myResourceGroup" | ||
``` | ||
##### Update ##### | ||
``` | ||
az logz monitor update --name "myMonitor" --monitoring-status "Enabled" --tags Environment="Dev" \ | ||
--resource-group "myResourceGroup" | ||
``` | ||
##### List-monitored-resource ##### | ||
``` | ||
az logz monitor list-monitored-resource --name "myMonitor" --resource-group "myResourceGroup" | ||
``` | ||
##### List-user-role ##### | ||
``` | ||
az logz monitor list-user-role --name "myMonitor" --resource-group "myResourceGroup" | ||
``` | ||
##### Delete ##### | ||
``` | ||
az logz monitor delete --name "myMonitor" --resource-group "myResourceGroup" | ||
``` | ||
#### logz tag-rule #### | ||
##### Create ##### | ||
``` | ||
az logz tag-rule create --monitor-name "myMonitor" --filtering-tags name="Environment" action="Include" value="Prod" \ | ||
--filtering-tags name="Environment" action="Exclude" value="Dev" --send-aad-logs false --send-activity-logs true \ | ||
--send-subscription-logs true --resource-group "myResourceGroup" --rule-set-name "default" | ||
``` | ||
##### Show ##### | ||
``` | ||
az logz tag-rule show --monitor-name "myMonitor" --resource-group "myResourceGroup" --rule-set-name "default" | ||
``` | ||
##### List ##### | ||
``` | ||
az logz tag-rule list --monitor-name "myMonitor" --resource-group "myResourceGroup" | ||
``` | ||
##### Delete ##### | ||
``` | ||
az logz tag-rule delete --monitor-name "myMonitor" --resource-group "myResourceGroup" --rule-set-name "default" | ||
``` | ||
#### logz single-sign-on #### | ||
##### Create ##### | ||
``` | ||
az logz single-sign-on create --configuration-name "default" --monitor-name "myMonitor" \ | ||
--properties enterprise-app-id="00000000-0000-0000-0000-000000000000" single-sign-on-state="Enable" single-sign-on-url=null \ | ||
--resource-group "myResourceGroup" | ||
``` | ||
##### Show ##### | ||
``` | ||
az logz single-sign-on show --configuration-name "default" --monitor-name "myMonitor" \ | ||
--resource-group "myResourceGroup" | ||
``` | ||
##### List ##### | ||
``` | ||
az logz single-sign-on list --monitor-name "myMonitor" --resource-group "myResourceGroup" | ||
``` | ||
#### logz sub-account #### | ||
##### Create ##### | ||
``` | ||
az logz sub-account create --monitor-name "myMonitor" --type "Microsoft.Logz/monitors" --location "West US" \ | ||
--monitoring-status "Enabled" --tags Environment="Dev" --resource-group "myResourceGroup" --name "SubAccount1" | ||
az logz sub-account wait --created --resource-group "{rg}" --name "{mySubAccount}" | ||
``` | ||
##### Show ##### | ||
``` | ||
az logz sub-account show --monitor-name "myMonitor" --resource-group "myResourceGroup" --name "SubAccount1" | ||
``` | ||
##### List ##### | ||
``` | ||
az logz sub-account list --monitor-name "myMonitor" --resource-group "myResourceGroup" | ||
``` | ||
##### Update ##### | ||
``` | ||
az logz sub-account update --monitor-name "myMonitor" --monitoring-status "Enabled" --tags Environment="Dev" \ | ||
--resource-group "myResourceGroup" --name "SubAccount1" | ||
``` | ||
##### List-monitored-resource ##### | ||
``` | ||
az logz sub-account list-monitored-resource --monitor-name "myMonitor" --resource-group "myResourceGroup" \ | ||
--name "SubAccount1" | ||
``` | ||
##### List-vm-host ##### | ||
``` | ||
az logz sub-account list-vm-host --monitor-name "myMonitor" --resource-group "myResourceGroup" --name "SubAccount1" | ||
``` | ||
##### List-vm-host-update ##### | ||
``` | ||
az logz sub-account list-vm-host-update --monitor-name "myMonitor" --state "Install" \ | ||
--resource-group "myResourceGroup" --name "SubAccount1" | ||
``` | ||
##### Vm-host-payload ##### | ||
``` | ||
az logz sub-account vm-host-payload --monitor-name "myMonitor" --resource-group "myResourceGroup" --name "SubAccount1" | ||
``` | ||
##### Delete ##### | ||
``` | ||
az logz sub-account delete --monitor-name "myMonitor" --resource-group "myResourceGroup" --name "someName" | ||
``` | ||
#### logz sub-account-tag-rule #### | ||
##### Create ##### | ||
``` | ||
az logz sub-account-tag-rule create --monitor-name "myMonitor" \ | ||
--filtering-tags name="Environment" action="Include" value="Prod" \ | ||
--filtering-tags name="Environment" action="Exclude" value="Dev" --send-aad-logs false --send-activity-logs true \ | ||
--send-subscription-logs true --resource-group "myResourceGroup" --rule-set-name "default" \ | ||
--sub-account-name "SubAccount1" | ||
``` | ||
##### Show ##### | ||
``` | ||
az logz sub-account-tag-rule show --monitor-name "myMonitor" --resource-group "myResourceGroup" \ | ||
--rule-set-name "default" --sub-account-name "SubAccount1" | ||
``` | ||
##### List ##### | ||
``` | ||
az logz sub-account-tag-rule list --monitor-name "myMonitor" --resource-group "myResourceGroup" \ | ||
--sub-account-name "SubAccount1" | ||
``` | ||
##### Delete ##### | ||
``` | ||
az logz sub-account-tag-rule delete --monitor-name "myMonitor" --resource-group "myResourceGroup" \ | ||
--rule-set-name "default" --sub-account-name "SubAccount1" | ||
``` | ||
#### logz monitor #### | ||
##### List-vm-host ##### | ||
``` | ||
az logz monitor list-vm-host --name "myMonitor" --resource-group "myResourceGroup" | ||
``` | ||
##### List-vm-host-update ##### | ||
``` | ||
az logz monitor list-vm-host-update --name "myMonitor" --state "Install" --resource-group "myResourceGroup" | ||
``` | ||
##### Vm-host-payload ##### | ||
``` | ||
az logz monitor vm-host-payload --name "myMonitor" --resource-group "myResourceGroup" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from azure.cli.core import AzCommandsLoader | ||
from azext_logz.generated._help import helps # pylint: disable=unused-import | ||
try: | ||
from azext_logz.manual._help import helps # pylint: disable=reimported | ||
except ImportError: | ||
pass | ||
|
||
|
||
class MicrosoftLogzCommandsLoader(AzCommandsLoader): | ||
|
||
def __init__(self, cli_ctx=None): | ||
from azure.cli.core.commands import CliCommandType | ||
from azext_logz.generated._client_factory import cf_logz_cl | ||
logz_custom = CliCommandType( | ||
operations_tmpl='azext_logz.custom#{}', | ||
client_factory=cf_logz_cl) | ||
parent = super(MicrosoftLogzCommandsLoader, self) | ||
parent.__init__(cli_ctx=cli_ctx, custom_command_type=logz_custom) | ||
|
||
def load_command_table(self, args): | ||
from azext_logz.generated.commands import load_command_table | ||
load_command_table(self, args) | ||
try: | ||
from azext_logz.manual.commands import load_command_table as load_command_table_manual | ||
load_command_table_manual(self, args) | ||
except ImportError: | ||
pass | ||
return self.command_table | ||
|
||
def load_arguments(self, command): | ||
from azext_logz.generated._params import load_arguments | ||
load_arguments(self, command) | ||
try: | ||
from azext_logz.manual._params import load_arguments as load_arguments_manual | ||
load_arguments_manual(self, command) | ||
except ImportError: | ||
pass | ||
|
||
|
||
COMMAND_LOADER_CLS = MicrosoftLogzCommandsLoader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
# pylint: disable=wildcard-import | ||
# pylint: disable=unused-wildcard-import | ||
|
||
from .generated.action import * # noqa: F403 | ||
try: | ||
from .manual.action import * # noqa: F403 | ||
except ImportError: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"azext.isExperimental": true, | ||
"azext.minCliCoreVersion": "2.15.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
# pylint: disable=wildcard-import | ||
# pylint: disable=unused-wildcard-import | ||
|
||
from .generated.custom import * # noqa: F403 | ||
try: | ||
from .manual.custom import * # noqa: F403 | ||
except ImportError: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
__path__ = __import__('pkgutil').extend_path(__path__, __name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
|
||
def cf_logz_cl(cli_ctx, *_): | ||
from azure.cli.core.commands.client_factory import get_mgmt_service_client | ||
from azext_logz.vendored_sdks.logz import MicrosoftLogz | ||
return get_mgmt_service_client(cli_ctx, | ||
MicrosoftLogz) | ||
|
||
|
||
def cf_monitor(cli_ctx, *_): | ||
return cf_logz_cl(cli_ctx).monitors | ||
|
||
|
||
def cf_tag_rule(cli_ctx, *_): | ||
return cf_logz_cl(cli_ctx).tag_rules | ||
|
||
|
||
def cf_single_sign_on(cli_ctx, *_): | ||
return cf_logz_cl(cli_ctx).single_sign_on | ||
|
||
|
||
def cf_sub_account(cli_ctx, *_): | ||
return cf_logz_cl(cli_ctx).sub_account | ||
|
||
|
||
def cf_sub_account_tag_rule(cli_ctx, *_): | ||
return cf_logz_cl(cli_ctx).sub_account_tag_rules | ||
|
||
|
||
def cf_monitor(cli_ctx, *_): | ||
return cf_logz_cl(cli_ctx).monitor |
Oops, something went wrong.