-
Notifications
You must be signed in to change notification settings - Fork 1.5k
CLI command description update #8776
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
Merged
kairu-ms
merged 9 commits into
Azure:main
from
shivansh257:users/agarwalshiv/Datadog/descriptionUpdate
May 26, 2025
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ec9f44f
update datadog commands description
5dc7a6a
update dynatrace properties
d48b863
regenerate datadog extension
319cf16
add test and remove swagger temporary changes
b8a9291
update examples
14e5552
update readme
428d01a
fixed breaking issue
8b5dd0a
az login
eaedc7a
az login issue
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -1,5 +1,88 @@ | ||
| Microsoft Azure CLI 'datadog' Extension | ||
| ========================================== | ||
| # Azure CLI Datadog Extension # | ||
| This is an extension to Azure CLI to manage Datadog resources. | ||
|
|
||
| This package is for the 'datadog' extension. | ||
| i.e. 'az datadog' | ||
| ## How to use ## | ||
| Install this extension using the below CLI command | ||
| ``` | ||
| az extension add --name datadog | ||
| ``` | ||
|
|
||
| ### Included Features ### | ||
| #### datadog monitor #### | ||
| ##### Create ##### | ||
| ``` | ||
| az datadog monitor create --name {monitor} --resource-group {rg} --sku {{name:payg_v3_Monthly@TIDgmz7xq9ge3py}} --identity {{type:SystemAssigned}} --user-info {{name:Alice,email-address:[email protected]}} | ||
| ``` | ||
| ``` | ||
| ##### Show ##### | ||
| ``` | ||
| az datadog monitor show --name {monitor} --resource-group {rg} | ||
| ``` | ||
| ##### List ##### | ||
| ``` | ||
| az datadog monitor list --resource-group {rg} | ||
| ``` | ||
| ##### Update ##### | ||
| ``` | ||
| az datadog monitor update --name {monitor} --resource-group {rg} --tags Environment="Dev2" | ||
| ``` | ||
| ##### Get default Keys ##### | ||
| ``` | ||
| az datadog monitor get-default-keys --name {monitor} --resource-group {rg} | ||
| ``` | ||
| ##### List Api Keys ##### | ||
| ``` | ||
| az datadog monitor list-api-keys --name {monitor} --resource-group {rg} | ||
| ``` | ||
| ##### Set default Keys ##### | ||
| ``` | ||
| az datadog monitor set-default-keys --name {monitor} --resource-group {rg} --api-key "{name:apiKey}" --key "1111111111111111aaaaaaaaaaaaaaaa" | ||
| ``` | ||
| ##### List Host ##### | ||
| ``` | ||
| az datadog monitor list-host --name {monitor} --resource-group {rg} | ||
| ``` | ||
| ##### List linked resources ##### | ||
| ``` | ||
| az datadog monitor list-linked-resource --name {monitor} --resource-group {rg} | ||
| ``` | ||
| ##### List Monitored resources ##### | ||
| ``` | ||
| az datadog monitor list-monitored-resource --name {monitor} --resource-group {rg} | ||
| ``` | ||
| ##### refresh set password likn ##### | ||
| ``` | ||
| az datadog monitor refresh-set-password-link --name {monitor} --resource-group {rg} | ||
| ``` | ||
| ##### delete ##### | ||
| ``` | ||
| az datadog monitor delete --name {monitor} --resource-group {rg} | ||
| ``` | ||
| ##### SSO create ##### | ||
| ``` | ||
| az datadog sso-config create --configuration-name "default" --monitor-name "{myMonitor}" --properties enterprise-app-id="ac754169-3489-42ae-bd06-8be89db12e58" single-sign-on-state="Enable" | ||
| ``` | ||
| ##### SSO show ##### | ||
| ``` | ||
| az datadog datadog sso-config show --configuration-name "default" --monitor-name "{myMonitor}" --resource-group "{rg}" | ||
| ``` | ||
| ##### SSO list ##### | ||
| ``` | ||
| az datadog sso-config list --monitor-name "{myMonitor}" --resource-group "{rg}" | ||
| ``` | ||
| ##### Tag rule create ##### | ||
| ``` | ||
| az tag-rule create --monitor-name "{myMonitor}" --log-rules-filtering-tags name="Environment" action="Include" value="Prod" --log-rules-filtering-tags name="Environment" action="Exclude" value="Dev" --send-aad-logs false --send-resource-logs true --send-subscription-logs true --resource-group "{rg}" | ||
| ``` | ||
| ##### Tag rule show ##### | ||
| ``` | ||
| az datadog tag-rule show --monitor-name "{myMonitor}" --resource-group "{rg}" | ||
| ``` | ||
| ##### Tag rule list ##### | ||
| ``` | ||
| az datadog tag-rule list --monitor-name "{myMonitor}" --resource-group "{rg}" | ||
| ``` | ||
| ##### list terms ##### | ||
| ``` | ||
| az datadog terms list | ||
| ``` | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -1,50 +1,42 @@ | ||
| # -------------------------------------------------------------------------- | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for | ||
| # license information. | ||
| # 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. | ||
| # -------------------------------------------------------------------------- | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| from azure.cli.core import AzCommandsLoader | ||
| from azext_datadog.generated._help import helps # pylint: disable=unused-import | ||
| try: | ||
| from azext_datadog.manual._help import helps # pylint: disable=reimported | ||
| except ImportError: | ||
| pass | ||
| from azext_datadog._help import helps # pylint: disable=unused-import | ||
|
|
||
|
|
||
| class MicrosoftDatadogClientCommandsLoader(AzCommandsLoader): | ||
| class DatadogCommandsLoader(AzCommandsLoader): | ||
|
|
||
| def __init__(self, cli_ctx=None): | ||
| from azure.cli.core.commands import CliCommandType | ||
| from azext_datadog.generated._client_factory import cf_datadog_cl | ||
| datadog_custom = CliCommandType( | ||
| operations_tmpl='azext_datadog.custom#{}', | ||
| client_factory=cf_datadog_cl) | ||
| parent = super(MicrosoftDatadogClientCommandsLoader, self) | ||
| parent.__init__(cli_ctx=cli_ctx, custom_command_type=datadog_custom) | ||
| custom_command_type = CliCommandType( | ||
| operations_tmpl='azext_datadog.custom#{}') | ||
| super().__init__(cli_ctx=cli_ctx, | ||
| custom_command_type=custom_command_type) | ||
|
|
||
| def load_command_table(self, args): | ||
| from azext_datadog.generated.commands import load_command_table | ||
| load_command_table(self, args) | ||
| from azext_datadog.commands import load_command_table | ||
| from azure.cli.core.aaz import load_aaz_command_table | ||
| try: | ||
| from azext_datadog.manual.commands import load_command_table as load_command_table_manual | ||
| load_command_table_manual(self, args) | ||
| from . import aaz | ||
| except ImportError: | ||
| pass | ||
| aaz = None | ||
| if aaz: | ||
| load_aaz_command_table( | ||
| loader=self, | ||
| aaz_pkg_name=aaz.__name__, | ||
| args=args | ||
| ) | ||
| load_command_table(self, args) | ||
| return self.command_table | ||
|
|
||
| def load_arguments(self, command): | ||
| from azext_datadog.generated._params import load_arguments | ||
| from azext_datadog._params import load_arguments | ||
| load_arguments(self, command) | ||
| try: | ||
| from azext_datadog.manual._params import load_arguments as load_arguments_manual | ||
| load_arguments_manual(self, command) | ||
| except ImportError: | ||
| pass | ||
|
|
||
|
|
||
| COMMAND_LOADER_CLS = MicrosoftDatadogClientCommandsLoader | ||
| COMMAND_LOADER_CLS = DatadogCommandsLoader |
11 changes: 5 additions & 6 deletions
11
src/datadog/azext_datadog/manual/_help.py → src/datadog/azext_datadog/_help.py
This file contains hidden or 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 |
|---|---|---|
| @@ -1,12 +1,11 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # 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 aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
| # pylint: disable=too-many-lines | ||
|
|
||
| from knack.help_files import helps | ||
| # pylint: disable=line-too-long | ||
| # pylint: disable=too-many-lines | ||
|
|
||
| helps['datadog'] = """ | ||
| type: group | ||
| short-summary: Manage datadog | ||
| """ | ||
| from knack.help_files import helps # pylint: disable=unused-import |
This file contains hidden or 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,13 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # 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 aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: disable=too-many-lines | ||
| # pylint: disable=too-many-statements | ||
|
|
||
|
|
||
| def load_arguments(self, _): # pylint: disable=unused-argument | ||
| pass |
11 changes: 4 additions & 7 deletions
11
...og/azext_datadog/generated/_validators.py → src/datadog/azext_datadog/aaz/__init__.py
This file contains hidden or 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 |
|---|---|---|
| @@ -1,9 +1,6 @@ | ||
| # -------------------------------------------------------------------------- | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for | ||
| # license information. | ||
| # 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. | ||
| # -------------------------------------------------------------------------- | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- |
14 changes: 7 additions & 7 deletions
14
...dog/vendored_sdks/datadog/aio/__init__.py → ...adog/azext_datadog/aaz/latest/__init__.py
This file contains hidden or 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 |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| # 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. | ||
| # -------------------------------------------------------------------------- | ||
| # | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: skip-file | ||
| # flake8: noqa | ||
|
|
||
| from ._microsoft_datadog_client import MicrosoftDatadogClient | ||
| __all__ = ['MicrosoftDatadogClient'] |
23 changes: 23 additions & 0 deletions
23
src/datadog/azext_datadog/aaz/latest/datadog/__cmd_group.py
This file contains hidden or 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,23 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # 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 aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: skip-file | ||
| # flake8: noqa | ||
|
|
||
| from azure.cli.core.aaz import * | ||
|
|
||
|
|
||
| @register_command_group( | ||
| "datadog", | ||
| ) | ||
| class __CMDGroup(AAZCommandGroup): | ||
| """Manage Datadog | ||
| """ | ||
| pass | ||
|
|
||
|
|
||
| __all__ = ["__CMDGroup"] |
This file contains hidden or 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,11 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # 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 aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: skip-file | ||
| # flake8: noqa | ||
|
|
||
| from .__cmd_group import * |
23 changes: 23 additions & 0 deletions
23
src/datadog/azext_datadog/aaz/latest/datadog/monitor/__cmd_group.py
This file contains hidden or 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,23 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # 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 aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: skip-file | ||
| # flake8: noqa | ||
|
|
||
| from azure.cli.core.aaz import * | ||
|
|
||
|
|
||
| @register_command_group( | ||
| "datadog monitor", | ||
| ) | ||
| class __CMDGroup(AAZCommandGroup): | ||
| """Provides a set of commands to manage Datadog monitor resources in your Azure subscription, enabling integration and observability of your Azure resources through Datadog. | ||
| """ | ||
| pass | ||
|
|
||
|
|
||
| __all__ = ["__CMDGroup"] |
24 changes: 24 additions & 0 deletions
24
src/datadog/azext_datadog/aaz/latest/datadog/monitor/__init__.py
This file contains hidden or 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,24 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # 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 aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: skip-file | ||
| # flake8: noqa | ||
|
|
||
| from .__cmd_group import * | ||
| from ._create import * | ||
| from ._delete import * | ||
| from ._get_default_key import * | ||
| from ._list import * | ||
| from ._list_api_key import * | ||
| from ._list_host import * | ||
| from ._list_linked_resource import * | ||
| from ._list_monitored_resource import * | ||
| from ._refresh_set_password_link import * | ||
| from ._set_default_key import * | ||
| from ._show import * | ||
| from ._update import * | ||
| from ._wait import * |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.